-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.hub.example
More file actions
108 lines (94 loc) · 4.46 KB
/
Copy path.env.hub.example
File metadata and controls
108 lines (94 loc) · 4.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# ============================================================
# Jobhunter — Docker Compose .env example
# ============================================================
# Copy this file to .env and fill in the values.
# NEVER commit .env to git (it is already in .gitignore).
#
# For local development with Docker:
# cp .env.hub.example .env
# docker compose -f docker-compose.hub.yml up -d
#
# For production deployment:
# - Generate a real JWT secret: openssl rand -base64 64
# - Set SPRING_PROFILES_ACTIVE=prod
# - Set CORS_ALLOWED_ORIGINS to your public domain
# - Set JWT_COOKIE_SECURE=true (requires HTTPS)
# - Set JOBHUNTER_SEED_ENABLED=false
# - Set JOBHUNTER_BOOTSTRAP_ADMIN_ENABLED=false
# - Rebuild images: docker build ./frontend/ and ./backend/
# ============================================================
# ---- Docker Hub image ----------------------------------------
# Replace nguyenson1710 with your actual Docker Hub username.
DOCKERHUB_USERNAME=nguyenson1710
# v3 = UI/UX polish (500 page, error boundary, meta titles, password toggle, support page). Use v2 for previous.
IMAGE_TAG=v3
# ---- Published ports (host) ----------------------------------
FRONTEND_PORT=3001
BACKEND_PORT=8080
DB_PORT=3307
# ---- MySQL --------------------------------------------------
MYSQL_DATABASE=jobhunter
MYSQL_USER=jobhunter
MYSQL_PASSWORD=jobhunter
MYSQL_ROOT_PASSWORD=root
TZ=Asia/Ho_Chi_Minh
# ---- Spring Profile -----------------------------------------
# dev,docker → Flyway migrations run, seed data loaded, verbose logging.
# prod → Swagger disabled, seed disabled, secure defaults.
# For local Docker use dev,docker. For production set prod.
SPRING_PROFILES_ACTIVE=dev,docker
# ---- JWT (HS512 — REQUIRED in production) ------------------
# Generate a secure secret: openssl rand -base64 64
# The secret must decode to at least 64 bytes.
JWT_BASE64_SECRET=REPLACE_WITH_BASE64_64_BYTE_SECRET
# ---- CORS Origins (REQUIRED in production) ------------------
# Comma-separated list of browser origins allowed to call the API.
# For local Docker: keep localhost origins.
# For production: replace with your public domain, e.g. https://jobhunter.example.com
CORS_ALLOWED_ORIGINS=http://localhost:3000,http://localhost:3001,http://127.0.0.1:3000,http://127.0.0.1:3001
# ---- JWT Cookie (REQUIRED in production) --------------------
# false for HTTP/localhost. true for HTTPS (production).
JWT_COOKIE_SECURE=false
# Lax = cookie sent on same-site navigations (recommended for HTTP).
JWT_COOKIE_SAME_SITE=Lax
# ---- Database -----------------------------------------------
# SON_JPA_DDL_AUTO=none is recommended when using Flyway.
FLYWAY_ENABLED=true
SON_JPA_DDL_AUTO=none
# ---- Admin Bootstrap ----------------------------------------
# Creates a bootstrap admin account on startup when SEED_ENABLED=true.
# IMPORTANT: Set JOBHUNTER_BOOTSTRAP_ADMIN_ENABLED=false after first boot
# to prevent accidental credential resets.
JOBHUNTER_BOOTSTRAP_ADMIN_ENABLED=true
JOBHUNTER_BOOTSTRAP_ADMIN_EMAIL=admin@jobhunter.local
JOBHUNTER_BOOTSTRAP_ADMIN_PASSWORD=changeme
JOBHUNTER_BOOTSTRAP_ADMIN_NAME=Super Admin
# ---- Seed Data ----------------------------------------------
# Set to false in production after the database schema is seeded.
JOBHUNTER_SEED_ENABLED=true
# ---- Actuator / Monitoring ----------------------------------
# health,info are safe to expose. prometheus,metrics are for internal
# monitoring only (consume inside the Docker network or behind a reverse proxy).
MANAGEMENT_ENDPOINTS_WEB_EXPOSURE_INCLUDE=health,info,prometheus,metrics
MANAGEMENT_ENDPOINT_HEALTH_SHOW_DETAILS=never
MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED=true
# ---- Scheduler (disable in production unless email is configured) --
JOBHUNTER_SCHEDULER_ENABLED=false
JOBHUNTER_MAIL_CRON_ENABLED=false
JOBHUNTER_WEEKLY_RECOMMENDATION_ENABLED=false
JOBHUNTER_LOG_CLEANUP_ENABLED=false
# ---- Mail (configure when SMTP is available) ----------------
MAIL_ENABLED=false
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_FROM=
MAIL_TEMPLATE_PORTAL_URL=http://localhost:3001
# ---- Frontend Runtime URLs -----------------------------------
# Browser (NEXT_PUBLIC_): must be accessible from the user's device.
# Server-side API URL must be accessible from inside the Docker network.
# Storage stays public because rendered image/CV links are consumed by the browser.
NEXT_PUBLIC_API_BASE_URL=http://localhost:8080
NEXT_PUBLIC_STORAGE_BASE_URL=http://localhost:8080
INTERNAL_API_BASE_URL=http://backend:8080