61 lines
1.3 KiB
YAML
61 lines
1.3 KiB
YAML
version: "3.8"
|
|
|
|
services:
|
|
jobs-app:
|
|
build: .
|
|
ports:
|
|
- "8001:8000"
|
|
environment:
|
|
# Required environment variables
|
|
- FLASK_SECRET="localtest8462851903856136136"
|
|
- FLASK_ENV=production
|
|
|
|
# Coolify magic variables
|
|
- SERVICE_FQDN_JOBS_APP=https://jobs.allucanget.biz
|
|
- ADMIN_PASSWORD=M11ffpgm.
|
|
- DB_USER=jobs
|
|
- DB_PASSWORD=jobdb
|
|
|
|
# Optional configuration
|
|
- 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
|
|
- "traefik.http.services.jobs-app.loadbalancer.server.port=8000"
|
|
networks:
|
|
- jobs-network
|
|
restart: unless-stopped
|
|
|
|
mysql:
|
|
image: mysql:8.0
|
|
environment:
|
|
- MYSQL_ROOT_PASSWORD="M11ffpgm."
|
|
- MYSQL_DATABASE=jobs
|
|
- MYSQL_USER=jobs
|
|
- MYSQL_PASSWORD=jobdb
|
|
ports:
|
|
- "3306:3306"
|
|
volumes:
|
|
- mysql_data:/var/lib/mysql
|
|
- ./mysql-init:/docker-entrypoint-initdb.d
|
|
networks:
|
|
- jobs-network
|
|
|
|
volumes:
|
|
mysql_data:
|
|
|
|
networks:
|
|
jobs-network:
|
|
driver: bridge
|