Spaces:
Sleeping
Sleeping
File size: 926 Bytes
d49e99c |
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.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: |