forked from CMP26Projects/ScoutManagementSystem
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.prod.yml
56 lines (51 loc) · 1.12 KB
/
docker-compose.prod.yml
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
46
47
48
49
50
51
52
53
54
55
56
services:
db:
image: postgres:16
restart: always
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
volumes:
- db-data:/var/lib/postgresql/data
networks:
- backend
frontend:
build:
context: ./client
dockerfile: Dockerfile.prod
args:
VITE_API_URL: ${API_URL}
restart: always
# NOTE: commented for coolify caddy when running prod locally uncomment
# ports:
# - 80:80
networks:
- frontend
backend:
build:
context: ./server
dockerfile: Dockerfile.prod
restart: always
ports:
- 5000:5000
environment:
FRONTEND_URL: ${FRONTEND_URL}
DB_HOST: db
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
DB_NAME: ${DB_NAME}
DATABASE_URL: postgresql://${DB_USER}:${DB_PASSWORD}@db:5432/${DB_NAME}?sslmode=disable
JWT_SECRET: ${JWT_SECRET}
JWT_EXPIRES_IN: ${JWT_EXPIRES_IN}
PORT: 5000
depends_on:
- db
networks:
- backend
- frontend
networks:
backend:
frontend:
volumes:
db-data: