-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
206 lines (197 loc) · 4.58 KB
/
docker-compose.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
version: '3.8'
services:
caddy:
image: caddy
container_name: caddy-proxy
ports:
- '80:80'
- '443:443'
restart: unless-stopped
networks:
- standardnotes_standalone
volumes:
- $PWD/Caddyfile:/etc/caddy/Caddyfile
- $PWD/certs:/etc/caddy/certs
- caddy_data:/data
- caddy_config:/config
syncing-server-js:
image: blmhemu/snotes-syncing-server-js:latest
container_name: syncing-server-js
depends_on:
- db
- cache
entrypoint:
[
'./wait-for.sh',
'db',
'3306',
'./wait-for.sh',
'cache',
'6379',
'./docker/entrypoint.sh',
'start-web',
]
env_file: .env
environment:
PORT: 3000
restart: unless-stopped
networks:
- standardnotes_standalone
syncing-server-js-worker:
image: blmhemu/snotes-syncing-server-js:latest
container_name: syncing-server-js-worker
depends_on:
- db
- cache
- syncing-server-js
entrypoint:
[
'./wait-for.sh',
'db',
'3306',
'./wait-for.sh',
'cache',
'6379',
'./wait-for.sh',
'syncing-server-js',
'3000',
'./docker/entrypoint.sh',
'start-worker',
]
env_file: .env
environment:
PORT: 3000
restart: unless-stopped
networks:
- standardnotes_standalone
api-gateway:
image: blmhemu/snotes-api-gateway:latest
container_name: api-gateway
depends_on:
- auth
- syncing-server-js
env_file: docker/api-gateway.env
environment:
PORT: 3000
AUTH_JWT_SECRET: '${AUTH_JWT_SECRET}'
entrypoint:
[
'./wait-for.sh',
'auth',
'3000',
'./wait-for.sh',
'syncing-server-js',
'3000',
'./docker/entrypoint.sh',
'start-web',
]
restart: unless-stopped
networks:
- standardnotes_standalone
auth:
image: blmhemu/snotes-auth:latest
container_name: auth
depends_on:
- db
- cache
- syncing-server-js
entrypoint:
[
'./wait-for.sh',
'db',
'3306',
'./wait-for.sh',
'cache',
'6379',
'./wait-for.sh',
'syncing-server-js',
'3000',
'./docker/entrypoint.sh',
'start-web',
]
env_file: docker/auth.env
environment:
PORT: 3000
DB_HOST: '${DB_HOST}'
DB_REPLICA_HOST: '${DB_REPLICA_HOST}'
DB_PORT: '${DB_PORT}'
DB_DATABASE: '${DB_DATABASE}'
DB_USERNAME: '${DB_USERNAME}'
DB_PASSWORD: '${DB_PASSWORD}'
DB_DEBUG_LEVEL: '${DB_DEBUG_LEVEL}'
DB_MIGRATIONS_PATH: '${DB_MIGRATIONS_PATH}'
REDIS_URL: '${REDIS_URL}'
AUTH_JWT_SECRET: '${AUTH_JWT_SECRET}'
restart: unless-stopped
networks:
- standardnotes_standalone
auth-worker:
image: blmhemu/snotes-auth:latest
container_name: auth-worker
depends_on:
- db
- cache
- auth
entrypoint:
[
'./wait-for.sh',
'db',
'3306',
'./wait-for.sh',
'cache',
'6379',
'./wait-for.sh',
'auth',
'3000',
'./docker/entrypoint.sh',
'start-worker',
]
env_file: docker/auth.env
environment:
PORT: 3000
DB_HOST: '${DB_HOST}'
DB_REPLICA_HOST: '${DB_REPLICA_HOST}'
DB_PORT: '${DB_PORT}'
DB_DATABASE: '${DB_DATABASE}'
DB_USERNAME: '${DB_USERNAME}'
DB_PASSWORD: '${DB_PASSWORD}'
DB_DEBUG_LEVEL: '${DB_DEBUG_LEVEL}'
DB_MIGRATIONS_PATH: '${DB_MIGRATIONS_PATH}'
REDIS_URL: '${REDIS_URL}'
AUTH_JWT_SECRET: '${AUTH_JWT_SECRET}'
restart: unless-stopped
networks:
- standardnotes_standalone
db:
image: jsurf/rpi-mariadb
container_name: db
environment:
MYSQL_DATABASE: '${DB_DATABASE}'
MYSQL_USER: '${DB_USERNAME}'
MYSQL_PASSWORD: '${DB_PASSWORD}'
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
expose:
- 3306
restart: unless-stopped
command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8 --collation-server=utf8_general_ci
volumes:
- ./data/mysql:/var/lib/mysql
- ./data/import:/docker-entrypoint-initdb.d
networks:
- standardnotes_standalone
cache:
image: redis:6.0-alpine
container_name: cache
volumes:
- ./data/redis/:/data
expose:
- 6379
restart: unless-stopped
networks:
- standardnotes_standalone
networks:
standardnotes_standalone:
name: standardnotes_standalone
volumes:
caddy_data:
caddy_config: