version: '3.9' services: postgres: image: postgres:16-alpine container_name: taskflow_postgres restart: unless-stopped environment: POSTGRES_DB: taskflow POSTGRES_USER: taskflow_user POSTGRES_PASSWORD: taskflow_secret volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U taskflow_user -d taskflow"] interval: 5s timeout: 5s retries: 10 networks: - taskflow_net backend: build: context: ./backend dockerfile: Dockerfile container_name: taskflow_backend restart: unless-stopped depends_on: postgres: condition: service_healthy environment: NODE_ENV: production PORT: 5000 DB_HOST: postgres DB_PORT: 5432 DB_NAME: taskflow DB_USER: taskflow_user DB_PASSWORD: taskflow_secret JWT_SECRET: change_this_to_a_long_random_secret_min_32_chars_in_production JWT_EXPIRES_IN: 7d FRONTEND_URL: http://localhost:3000 networks: - taskflow_net healthcheck: test: ["CMD-SHELL", "wget -qO- http://localhost:5000/health || exit 1"] interval: 10s timeout: 5s retries: 5 seed: build: context: ./backend dockerfile: Dockerfile container_name: taskflow_seed depends_on: backend: condition: service_healthy environment: NODE_ENV: development DB_HOST: postgres DB_PORT: 5432 DB_NAME: taskflow DB_USER: taskflow_user DB_PASSWORD: taskflow_secret command: ["node", "src/utils/seed.js"] networks: - taskflow_net profiles: - seed frontend: build: context: ./frontend dockerfile: Dockerfile container_name: taskflow_frontend restart: unless-stopped depends_on: backend: condition: service_healthy ports: - "3000:80" networks: - taskflow_net volumes: postgres_data: networks: taskflow_net: driver: bridge