services: backend: build: ./backend container_name: portfolio-backend env_file: - .env environment: - CORS_ORIGINS=http://localhost,http://localhost:80,http://localhost:5173 - PORTFOLIO_DB_PATH=/app/data/portfolio.db # Served over plain HTTP on localhost by default. Set to true once you # put the app behind HTTPS so the session cookie is only sent over TLS. - SESSION_COOKIE_SECURE=false expose: - "8000" ports: - "8000:8000" volumes: - ./data:/app/data restart: unless-stopped healthcheck: test: ["CMD", "python", "-c", "import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://localhost:8000/api/health').status==200 else 1)"] interval: 30s timeout: 5s retries: 3 frontend: build: ./frontend container_name: portfolio-frontend depends_on: - backend ports: - "80:80" restart: unless-stopped