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