-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.production.example
More file actions
61 lines (51 loc) · 2.21 KB
/
Copy path.env.production.example
File metadata and controls
61 lines (51 loc) · 2.21 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
# ============================================================================
# PRODUCTION ENVIRONMENT VARIABLES FOR VPS DEPLOYMENT
# Copy this file to .env and fill in with actual production values
# ============================================================================
# PostgreSQL Database Configuration
POSTGRES_DB=nachweise_db
POSTGRES_USER=nachweise_user
POSTGRES_PASSWORD=CHANGE_THIS_TO_STRONG_PASSWORD_MIN_20_CHARS
# Spring Boot Backend Configuration
SPRING_PROFILES_ACTIVE=production
SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/nachweise_db
SPRING_DATASOURCE_USERNAME=nachweise_user
SPRING_DATASOURCE_PASSWORD=CHANGE_THIS_TO_STRONG_PASSWORD_MIN_20_CHARS
# Server Port (exposed via docker-compose)
SERVER_PORT=8088
BACKEND_PORT=8088
# JWT Configuration (MUST BE CHANGED - use strong random string)
# Generate with: openssl rand -base64 32
JWT_SECRET=GENERATE_STRONG_SECRET_WITH_OPENSSL_RAND_BASE64_32
JWT_EXPIRATION=86400000
# Frontend Configuration
FRONTEND_PORT=3000
NEXT_PUBLIC_API_URL=https://api.yourdomain.com
NODE_ENV=production
# Mail Configuration (REQUIRED for password reset)
SPRING_MAIL_HOST=smtp.gmail.com
SPRING_MAIL_PORT=587
SPRING_MAIL_USERNAME=your-production-email@gmail.com
SPRING_MAIL_PASSWORD=your-production-app-password
SPRING_MAIL_SMTP_AUTH=true
SPRING_MAIL_STARTTLS_ENABLE=true
SPRING_MAIL_STARTTLS_REQUIRED=true
# CORS and Frontend URL
APP_FRONTEND_URL=https://yourdomain.com
APP_FRONTEND_ORIGINS=https://yourdomain.com,https://www.yourdomain.com
# JVM Options (adjust based on VPS resources)
JAVA_OPTS=-Xmx1024m -Xms512m
# Logging
LOGGING_LEVEL_ROOT=WARN
LOGGING_LEVEL_SPRINGFRAMEWORK=WARN
# ============================================================================
# NOTES FOR VPS DEPLOYMENT:
# ============================================================================
# 1. Change all passwords to strong, random values
# 2. Set JWT_SECRET to a strong random value
# 3. Update NEXT_PUBLIC_API_URL to your actual domain (with https)
# 4. Set APP_FRONTEND_URL to your actual domain
# 5. Configure mail credentials for password reset feature
# 6. Ensure ports 80 and 443 are open for Caddy reverse proxy
# 7. Run: docker-compose pull && docker-compose up -d
# 8. Check logs: docker-compose logs -f