Spaces:
Sleeping
Sleeping
File size: 1,137 Bytes
f6c14df | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | 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"
|