Spaces:
Running
Running
| version: '3.8' | |
| services: | |
| db: | |
| image: postgres:17 | |
| restart: always | |
| environment: | |
| POSTGRES_USER: n4sm_user | |
| POSTGRES_PASSWORD: securepass | |
| POSTGRES_DB: n4sm | |
| ports: | |
| - '5432:5432' | |
| volumes: | |
| - db-data:/var/lib/postgresql/data | |
| backend: | |
| build: | |
| context: ./backend | |
| dockerfile: Dockerfile | |
| depends_on: | |
| - db | |
| ports: | |
| - '3000:3000' | |
| environment: | |
| - DATABASE_URL=postgresql://n4sm_user:securepass@db:5432/n4sm | |
| - NODE_ENV=production | |
| volumes: | |
| - ./backend:/app | |
| - /app/node_modules | |
| frontend: | |
| build: | |
| context: ./frontend | |
| dockerfile: Dockerfile | |
| depends_on: | |
| - backend | |
| ports: | |
| - '5173:5173' | |
| environment: | |
| - NODE_ENV=production | |
| volumes: | |
| - ./frontend:/app | |
| - /app/node_modules | |
| stdin_open: true | |
| tty: true | |
| volumes: | |
| db-data: |