-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
39 lines (36 loc) · 787 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
39 lines (36 loc) · 787 Bytes
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
version: "3.8"
services:
db:
image: postgres:15-alpine
env_file: .env
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "${POSTGRES_PORT}:5432"
backend:
build: ./backend
env_file: .env
depends_on:
- db
ports:
- "${BACKEND_PORT}:5000"
volumes:
- ./backend:/usr/src/app
command: ["node", "index.js"]
frontend:
build: ./frontend
depends_on:
- backend
ports:
- "3000:3000"
volumes:
- ./frontend:/usr/src/app
environment:
- NEXT_PUBLIC_BACKEND_URL=${NEXT_PUBLIC_BACKEND_URL}
command: ["npm", "run", "dev"]
volumes:
pgdata: