-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompose.yaml
executable file
·44 lines (44 loc) · 1.31 KB
/
compose.yaml
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
services:
database:
image: postgres
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DATABASE}
JWT_SECRET: ${JWT_SECRET}
ports:
- '5432:5432'
backend:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "3001:3001"
environment:
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@database:5432/${POSTGRES_DATABASE}
JWT_SECRET: ${JWT_SECRET}
depends_on:
- database
volumes:
- ./backend:/app
- /app/node_modules
command: sh -c "npm install && npm run start:dev"
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "3000:3000"
- "5555:5555"
environment:
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@database:5432/${POSTGRES_DATABASE}
NEXT_PUBLIC_API_URL: "http://localhost:3001"
JWT_SECRET: ${JWT_SECRET}
depends_on:
- backend
- database
volumes:
- ./frontend:/app
- /app/node_modules
command: sh -c "npm install && npm run dev"