Finalisation Docker Raspberry et corrections dashboard

This commit is contained in:
2026-04-25 19:13:28 +02:00
parent 3a722867a7
commit 9a1ec86d33
6 changed files with 33 additions and 19 deletions

View File

@@ -2,30 +2,36 @@ services:
db:
image: postgres:15-alpine
container_name: ecocharge_db
restart: unless-stopped
environment:
POSTGRES_USER: ecocharge_user
POSTGRES_PASSWORD: ecocharge_password
POSTGRES_DB: ecocharge
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./database.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ecocharge_user -d ecocharge"]
interval: 5s
timeout: 5s
retries: 10
web:
build: .
container_name: ecocharge_web
restart: unless-stopped
ports:
- "5001:5000"
depends_on:
- db
db:
condition: service_healthy
environment:
- DB_HOST=db
- DB_PORT=5432
- DB_NAME=ecocharge
- DB_USER=ecocharge_user
- DB_PASSWORD=ecocharge_password
- SECRET_KEY=super_cle_secrete_projet
DB_HOST: db
DB_PORT: 5432
DB_NAME: ecocharge
DB_USER: ecocharge_user
DB_PASSWORD: ecocharge_password
SECRET_KEY: super_cle_secrete_projet
volumes:
postgres_data: