This commit is contained in:
Johan
2026-02-04 11:52:22 +01:00
parent d6f1cd0360
commit 0004fa1895
5 changed files with 201 additions and 4 deletions

50
docker-compose.yml Normal file
View File

@@ -0,0 +1,50 @@
version: '3.9'
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
target: runtime
container_name: eni-backend
ports:
- "8000:8000"
environment:
- DATABASE_URL=sqlite:///./test.db
volumes:
- ./backend/app:/app/app
restart: unless-stopped
networks:
- eni-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/docs"]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: eni-frontend
ports:
- "80:80"
environment:
- API_URL=http://backend:8000
depends_on:
backend:
condition: service_healthy
restart: unless-stopped
networks:
- eni-network
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost/"]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
networks:
eni-network:
driver: bridge