core: add ci
Some checks failed
Build and Publish Docker Images / build-and-push (push) Has been cancelled
Some checks failed
Build and Publish Docker Images / build-and-push (push) Has been cancelled
This commit is contained in:
35
docker-compose.yml
Normal file
35
docker-compose.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
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
|
||||
Reference in New Issue
Block a user