-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
57 lines (53 loc) · 1.19 KB
/
docker-compose.prod.yml
File metadata and controls
57 lines (53 loc) · 1.19 KB
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
57
version: "3.9"
services:
postgres:
image: postgres:17
container_name: pg17
restart: unless-stopped
env_file:
- ./server/.env
environment:
POSTGRES_USER: ${DB_USER:-pguser}
POSTGRES_PASSWORD: ${DB_PASSWORD:-pgpassword}
POSTGRES_DB: ${DB_NAME:-markopolo}
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U ${DB_USERNAME:-pguser} -d ${DB_NAME:-markopolo}",
]
interval: 10s
timeout: 5s
retries: 5
server:
image: ${IMAGE_REGISTRY_PREFIX}/nest-server:latest
container_name: nest-server
restart: unless-stopped
env_file:
- ./server/.env
environment:
- DB_HOST=postgres
- PORT=8080
- NODE_ENV=production
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
client:
image: ${IMAGE_REGISTRY_PREFIX}/next-client:latest
container_name: next-client
restart: unless-stopped
environment:
- API_URL=http://server:8080
- NODE_ENV=production
ports:
- "3000:3000"
depends_on:
- server
volumes:
pgdata: