modified docker-compose.yml

This commit is contained in:
2025-09-08 17:18:11 +02:00
parent 0f5c2fcf31
commit 56315fe147

View File

@@ -6,10 +6,32 @@ services:
ports:
- "8000:8000"
environment:
- FLASK_ENV=production
- FLASK_SECRET=production-secret-change-me
# Required environment variables
- FLASK_SECRET=${FLASK_SECRET:?}
- FLASK_ENV=${FLASK_ENV:?production}
# Coolify magic variables
- SERVICE_FQDN_JOBS_APP
- ADMIN_PASSWORD=${SERVICE_PASSWORD_ADMIN:?M11ffpgm.}
- DB_USER=${SERVICE_USER_DB:?jobs}
- DB_PASSWORD=${SERVICE_PASSWORD_DB:?jobdb}
# Optional configuration
- GUNICORN_WORKERS=${GUNICORN_WORKERS:-4}
volumes:
- type: bind
source: ./cache
target: /app/cache
- type: bind
source: ./logs
target: /app/logs
depends_on:
- mysql
labels:
- coolify.managed=true
- traefik.enable=true
- "traefik.http.routers.jobs-app.rule=Host(`${SERVICE_FQDN_JOBS_APP:-localhost}`)"
- traefik.http.routers.jobs-app.entryPoints=http
networks:
- jobs-network
restart: unless-stopped
@@ -17,10 +39,10 @@ services:
mysql:
image: mysql:8.0
environment:
- MYSQL_ROOT_PASSWORD=rootpassword
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:?rootpassword}
- MYSQL_DATABASE=jobs
- MYSQL_USER=jobs
- MYSQL_PASSWORD=jobdb
- MYSQL_USER=${DB_USER:-jobs}
- MYSQL_PASSWORD=${DB_PASSWORD:-jobdb}
ports:
- "3306:3306"
volumes:
@@ -28,8 +50,6 @@ services:
- ./mysql-init:/docker-entrypoint-initdb.d
networks:
- jobs-network
restart: unless-stopped
command: --default-authentication-plugin=mysql_native_password
volumes:
mysql_data: