Spaces:
Sleeping
Sleeping
| version: '3.9' | |
| # Development override - mounts source code for hot reloading | |
| # Usage: docker-compose -f docker-compose.yml -f docker-compose.dev.yml up | |
| services: | |
| postgres: | |
| ports: | |
| - "5432:5432" # expose DB port for local tools (TablePlus, DBeaver, etc.) | |
| backend: | |
| build: | |
| context: ./backend | |
| dockerfile: Dockerfile | |
| command: ["sh", "-c", "node src/utils/migrate.js && npm run dev"] | |
| environment: | |
| NODE_ENV: development | |
| PORT: 5000 | |
| DB_HOST: postgres | |
| DB_PORT: 5432 | |
| DB_NAME: taskflow | |
| DB_USER: taskflow_user | |
| DB_PASSWORD: taskflow_secret | |
| JWT_SECRET: dev_secret_change_in_production_min_32_chars_long | |
| JWT_EXPIRES_IN: 7d | |
| FRONTEND_URL: http://localhost:3000 | |
| volumes: | |
| - ./backend:/app | |
| - /app/node_modules | |
| ports: | |
| - "5000:5000" | |
| frontend: | |
| build: | |
| context: ./frontend | |
| dockerfile: Dockerfile.dev | |
| environment: | |
| REACT_APP_API_URL: http://localhost:5000/api | |
| CHOKIDAR_USEPOLLING: "true" | |
| volumes: | |
| - ./frontend/src:/app/src | |
| - ./frontend/public:/app/public | |
| ports: | |
| - "3000:3000" | |