Some checks failed
Build and Publish Docker Images / build-and-push (push) Has been cancelled
35 lines
901 B
YAML
35 lines
901 B
YAML
services:
|
|
notytex:
|
|
build: .
|
|
ports:
|
|
- "5000:5000"
|
|
environment:
|
|
- SECRET_KEY=${SECRET_KEY}
|
|
- DATABASE_URL=sqlite:///instance/school_management.db
|
|
- FLASK_ENV=production
|
|
- DEBUG=false
|
|
- LOG_LEVEL=INFO
|
|
volumes:
|
|
- ./instance:/app/instance
|
|
- ./logs:/app/logs
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -f http://localhost:5000/ || exit 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
# Service d'initialisation (à lancer une seule fois)
|
|
notytex-init:
|
|
build: .
|
|
environment:
|
|
- SECRET_KEY=${SECRET_KEY}
|
|
- DATABASE_URL=sqlite:///instance/school_management.db
|
|
- FLASK_ENV=development
|
|
volumes:
|
|
- ./instance:/app/instance
|
|
- ./logs:/app/logs
|
|
command: ["uv", "run", "flask", "--app", "app", "init-db"]
|
|
profiles:
|
|
- init |