Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ba8c95142 | |||
| a9546dcc63 | |||
| d7b47f2abe |
Binary file not shown.
@@ -38,6 +38,9 @@ RUN npm ci --only=production && npm cache clean --force
|
|||||||
COPY --from=builder /app/dist ./dist
|
COPY --from=builder /app/dist ./dist
|
||||||
COPY --from=builder /app/package.json ./
|
COPY --from=builder /app/package.json ./
|
||||||
|
|
||||||
|
# Copy assets directory for email templates and logos
|
||||||
|
COPY --from=builder /app/assets ./assets
|
||||||
|
|
||||||
# Create logs directory with proper permissions
|
# Create logs directory with proper permissions
|
||||||
RUN mkdir -p logs && chmod 777 logs
|
RUN mkdir -p logs && chmod 777 logs
|
||||||
|
|
||||||
|
|||||||
@@ -28,12 +28,12 @@ JWT_REFRESH_EXPIRATION=7d
|
|||||||
|
|
||||||
# Email Configuration (SMTP)
|
# Email Configuration (SMTP)
|
||||||
# CHANGE THESE: Configure your email provider
|
# CHANGE THESE: Configure your email provider
|
||||||
EMAIL_HOST=smtp.yourmailprovider.com
|
EMAIL_HOST=mail.serpentrace.hu
|
||||||
EMAIL_PORT=587
|
EMAIL_PORT=465
|
||||||
EMAIL_SECURE=false
|
EMAIL_SECURE=true
|
||||||
EMAIL_USER=your_email@yourdomain.com
|
EMAIL_USER=noreply@serpentrace.hu
|
||||||
EMAIL_PASS=your_email_password
|
EMAIL_PASS=ZUx720ece&Cin&F{
|
||||||
EMAIL_FROM="SerpentRace <noreply@yourdomain.com>"
|
EMAIL_FROM="SerpentRace <noreply@serpentrace.hu>"
|
||||||
|
|
||||||
# MinIO Object Storage
|
# MinIO Object Storage
|
||||||
MINIO_ENDPOINT=minio
|
MINIO_ENDPOINT=minio
|
||||||
@@ -45,7 +45,8 @@ MINIO_SECRET_KEY=CHANGE_THIS_MINIO_SECRET_KEY_123!
|
|||||||
MINIO_BUCKET_NAME=serpentrace-logs
|
MINIO_BUCKET_NAME=serpentrace-logs
|
||||||
|
|
||||||
# Application Settings
|
# Application Settings
|
||||||
APP_BASE_URL=http://your-domain.com
|
APP_BASE_URL=https://szesnake.ddc.sze.hu
|
||||||
|
FRONTEND_URL=https://szesnake.ddc.sze.hu
|
||||||
PORT=3000
|
PORT=3000
|
||||||
|
|
||||||
# Chat System Limits
|
# Chat System Limits
|
||||||
|
|||||||
@@ -8,31 +8,8 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
environment:
|
env_file:
|
||||||
- NODE_ENV=production
|
- .env.server
|
||||||
- PORT=3000
|
|
||||||
- DB_HOST=postgres
|
|
||||||
- DB_PORT=5432
|
|
||||||
- DB_NAME=serpentrace
|
|
||||||
- DB_USERNAME=postgres
|
|
||||||
- DB_PASSWORD=${POSTGRES_PASSWORD}
|
|
||||||
- REDIS_URL=redis://redis:6379
|
|
||||||
- REDIS_HOST=redis
|
|
||||||
- REDIS_PORT=6379
|
|
||||||
- JWT_SECRET=${JWT_SECRET}
|
|
||||||
- JWT_EXPIRATION=${JWT_EXPIRATION:-24h}
|
|
||||||
- JWT_REFRESH_EXPIRATION=${JWT_REFRESH_EXPIRATION:-7d}
|
|
||||||
- MINIO_ENDPOINT=minio
|
|
||||||
- MINIO_PORT=9000
|
|
||||||
- MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY}
|
|
||||||
- MINIO_SECRET_KEY=${MINIO_SECRET_KEY}
|
|
||||||
- MINIO_USE_SSL=false
|
|
||||||
- EMAIL_HOST=${EMAIL_HOST}
|
|
||||||
- EMAIL_PORT=${EMAIL_PORT}
|
|
||||||
- EMAIL_SECURE=${EMAIL_SECURE}
|
|
||||||
- EMAIL_USER=${EMAIL_USER}
|
|
||||||
- EMAIL_PASS=${EMAIL_PASS}
|
|
||||||
- EMAIL_FROM=${EMAIL_FROM}
|
|
||||||
volumes:
|
volumes:
|
||||||
- backend_logs:/app/logs
|
- backend_logs:/app/logs
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -44,12 +21,7 @@ services:
|
|||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
networks:
|
networks:
|
||||||
- serpentrace-network
|
- serpentrace-network
|
||||||
healthcheck:
|
tty: true
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
|
|
||||||
interval: 30s
|
|
||||||
timeout: 10s
|
|
||||||
retries: 3
|
|
||||||
start_period: 40s
|
|
||||||
|
|
||||||
# Frontend service using pre-built image
|
# Frontend service using pre-built image
|
||||||
frontend:
|
frontend:
|
||||||
@@ -57,8 +29,10 @@ services:
|
|||||||
container_name: serpentrace-frontend
|
container_name: serpentrace-frontend
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "8080:80"
|
||||||
- "443:443"
|
- "443:443"
|
||||||
|
volumes:
|
||||||
|
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
networks:
|
networks:
|
||||||
@@ -79,7 +53,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
POSTGRES_DB: serpentrace
|
POSTGRES_DB: serpentrace
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
POSTGRES_PASSWORD: postgres
|
||||||
POSTGRES_INITDB_ARGS: "--encoding=UTF-8"
|
POSTGRES_INITDB_ARGS: "--encoding=UTF-8"
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
@@ -101,7 +75,7 @@ services:
|
|||||||
- "6379:6379"
|
- "6379:6379"
|
||||||
volumes:
|
volumes:
|
||||||
- redis_data:/data
|
- redis_data:/data
|
||||||
command: redis-server --appendonly yes --requirepass ${REDIS_PASSWORD}
|
command: redis-server --appendonly yes
|
||||||
networks:
|
networks:
|
||||||
- serpentrace-network
|
- serpentrace-network
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@@ -119,8 +93,8 @@ services:
|
|||||||
- "9000:9000"
|
- "9000:9000"
|
||||||
- "9001:9001"
|
- "9001:9001"
|
||||||
environment:
|
environment:
|
||||||
MINIO_ROOT_USER: ${MINIO_ACCESS_KEY}
|
MINIO_ROOT_USER: serpentrace
|
||||||
MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY}
|
MINIO_ROOT_PASSWORD: serpentrace123!
|
||||||
volumes:
|
volumes:
|
||||||
- minio_data:/data
|
- minio_data:/data
|
||||||
command: server /data --console-address ":9001"
|
command: server /data --console-address ":9001"
|
||||||
@@ -132,45 +106,32 @@ services:
|
|||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
|
|
||||||
|
# Adminer Database Viewer
|
||||||
|
adminer:
|
||||||
|
image: adminer:latest
|
||||||
|
container_name: serpentrace-adminer
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "8083:8080" # Access via http://<server-ip>:8083
|
||||||
|
depends_on:
|
||||||
|
- postgres
|
||||||
|
networks:
|
||||||
|
- serpentrace-network
|
||||||
|
|
||||||
# Redis Commander for internal administration
|
# Redis Commander
|
||||||
redis-commander:
|
redis-commander:
|
||||||
image: rediscommander/redis-commander:latest
|
image: rediscommander/redis-commander:latest
|
||||||
container_name: serpentrace-redis-commander-dev
|
container_name: serpentrace-redis-commander
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "8081:8081"
|
- "8082:8081" # Access via http://<server-ip>:8082
|
||||||
environment:
|
environment:
|
||||||
- REDIS_HOSTS=local:redis:6379
|
REDIS_HOSTS: local:serpentrace-redis:6379
|
||||||
depends_on:
|
depends_on:
|
||||||
redis:
|
- redis
|
||||||
condition: service_healthy
|
|
||||||
networks:
|
networks:
|
||||||
- serpentrace-network
|
- serpentrace-network
|
||||||
|
|
||||||
# Database administration tool for internal administration
|
|
||||||
pgadmin:
|
|
||||||
image: dpage/pgadmin4:latest
|
|
||||||
container_name: serpentrace-pgadmin
|
|
||||||
restart: unless-stopped
|
|
||||||
ports:
|
|
||||||
- "5050:80"
|
|
||||||
environment:
|
|
||||||
PGADMIN_DEFAULT_EMAIL: admin@serpentrace.dev
|
|
||||||
PGADMIN_DEFAULT_PASSWORD: admin
|
|
||||||
PGADMIN_CONFIG_SERVER_MODE: 'False'
|
|
||||||
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: 'False'
|
|
||||||
PGADMIN_CONFIG_WTF_CSRF_ENABLED: 'False'
|
|
||||||
volumes:
|
|
||||||
- pgadmin_data:/var/lib/pgadmin
|
|
||||||
- ./deployment/pgadmin_servers_deployment.json:/pgadmin4/servers.json:ro
|
|
||||||
depends_on:
|
|
||||||
postgres:
|
|
||||||
condition: service_healthy
|
|
||||||
networks:
|
|
||||||
- serpentrace-network
|
|
||||||
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres_data:
|
postgres_data:
|
||||||
driver: local
|
driver: local
|
||||||
@@ -180,8 +141,6 @@ volumes:
|
|||||||
driver: local
|
driver: local
|
||||||
backend_logs:
|
backend_logs:
|
||||||
driver: local
|
driver: local
|
||||||
pgadmin_data:
|
|
||||||
driver: local
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
serpentrace-network:
|
serpentrace-network:
|
||||||
|
|||||||
@@ -45,10 +45,43 @@ server {
|
|||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Static assets caching
|
# Adminer Database Viewer proxy
|
||||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
|
location /adminer/ {
|
||||||
expires 1y;
|
proxy_pass http://adminer:8080/;
|
||||||
add_header Cache-Control "public, immutable";
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Redis Commander proxy
|
||||||
|
location /redis/ {
|
||||||
|
proxy_pass http://redis-commander:8081/;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection 'upgrade';
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_redirect http://redis-commander:8081/ /redis/;
|
||||||
|
proxy_cache_bypass $http_upgrade;
|
||||||
|
}
|
||||||
|
|
||||||
|
# MinIO Console proxy
|
||||||
|
location /minio/ {
|
||||||
|
proxy_pass http://minio:9001/;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection 'upgrade';
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_redirect http://minio:9001/ /minio/;
|
||||||
|
sub_filter '<base href="/"' '<base href="/minio/"';
|
||||||
|
sub_filter_types text/html;
|
||||||
|
proxy_cache_bypass $http_upgrade;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Health check endpoint
|
# Health check endpoint
|
||||||
|
|||||||
Reference in New Issue
Block a user