This repository was archived by the owner on Jan 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
80 lines (73 loc) · 1.54 KB
/
docker-compose.yml
File metadata and controls
80 lines (73 loc) · 1.54 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
version: "3.9"
services:
haproxy:
image: haproxy:2.4-alpine
depends_on:
- integer_api
deploy:
placement:
constraints:
- node.role==manager
max_replicas_per_node: 1
environment:
TZ: Asia/Seoul
networks:
- backend
ports:
- "80:80"
- "443:443"
- "8404:8404"
restart: unless-stopped
secrets:
- site.pem
volumes:
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
integer_api:
image: integer_api
build: .
deploy:
replicas: 1
depends_on:
- postgres
environment:
DB_HOST: postgres
DB_USER: inti
DB_PASSWORD_FILE: /run/secrets/postgres_password
networks:
- backend
restart: unless-stopped
secrets:
- postgres_password
postgres:
image: postgres:13-alpine
deploy:
placement:
constraints:
- node.role==manager
max_replicas_per_node: 1
environment:
TZ: Asia/Seoul
POSTGRES_DB: integer
POSTGRES_USER: inti
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
healthcheck:
test: ["CMD", "pg_isready", "-d", "integer", "-U", "inti"]
networks:
- backend
ports:
- "5432:5432"
restart: unless-stopped
secrets:
- postgres_password
volumes:
- ./db/initdb.d:/docker-entrypoint-initdb.d:ro
- postgres_data:/var/lib/postgresql/data
networks:
backend:
secrets:
postgres_password:
external: true
site.pem:
external: true
volumes:
postgres_data: