-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose-cluster.yml
106 lines (100 loc) · 2.55 KB
/
docker-compose-cluster.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
version: '3.8'
services:
app1:
image: clivern/lynx:0.12.3
environment:
APP_NAME: Lynx
APP_PORT: 4001
APP_SECRET: koPmu7TJCwD8mttV9vgWUeU7iuu/zTPOR3sX4UalM9KkYEVGPfyi0PeTVzu1TT8C
APP_HOST: localhost
APP_HTTP_SCHEMA: http
DB_USERNAME: root
DB_PASSWORD: D1q9f0C2&PEW
DB_HOSTNAME: db
DB_DATABASE: lynx
DB_PORT: 5432
DB_SSL: null
DB_CA_CERTFILE_PATH: null
MIX_ENV: prod
command: sh -c "/app/bin/migrate && /app/bin/server"
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:4001/_health"]
interval: 30s
retries: 3
restart: unless-stopped
depends_on:
- db
app2:
image: clivern/lynx:0.12.3
environment:
APP_NAME: Lynx
APP_PORT: 4002
APP_SECRET: koPmu7TJCwD8mttV9vgWUeU7iuu/zTPOR3sX4UalM9KkYEVGPfyi0PeTVzu1TT8C
APP_HOST: localhost
APP_HTTP_SCHEMA: http
DB_USERNAME: root
DB_PASSWORD: D1q9f0C2&PEW
DB_HOSTNAME: db
DB_DATABASE: lynx
DB_PORT: 5432
DB_SSL: null
DB_CA_CERTFILE_PATH: null
MIX_ENV: prod
command: sh -c "/app/bin/migrate && /app/bin/server"
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:4002/_health"]
interval: 30s
retries: 3
restart: unless-stopped
depends_on:
- db
app3:
image: clivern/lynx:0.12.3
environment:
APP_NAME: Lynx
APP_PORT: 4003
APP_SECRET: koPmu7TJCwD8mttV9vgWUeU7iuu/zTPOR3sX4UalM9KkYEVGPfyi0PeTVzu1TT8C
APP_HOST: localhost
APP_HTTP_SCHEMA: http
DB_USERNAME: root
DB_PASSWORD: D1q9f0C2&PEW
DB_HOSTNAME: db
DB_DATABASE: lynx
DB_PORT: 5432
DB_SSL: null
DB_CA_CERTFILE_PATH: null
MIX_ENV: prod
command: sh -c "/app/bin/migrate && /app/bin/server"
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:4003/_health"]
interval: 30s
retries: 3
restart: unless-stopped
depends_on:
- db
db:
image: postgres:16.4
environment:
POSTGRES_DB: lynx
POSTGRES_USER: root
POSTGRES_PASSWORD: D1q9f0C2&PEW
restart: unless-stopped
volumes:
- db:/var/lib/postgresql/data
nginx:
image: nginx:1.25.4-alpine3.18
ports:
- '80:80'
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost/_health"]
interval: 30s
retries: 3
restart: unless-stopped
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- nginx_logs:/var/log/nginx
volumes:
db:
driver: local
nginx_logs:
driver: local