This repository has been archived by the owner on Mar 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
202 lines (189 loc) · 4.91 KB
/
docker-compose.yaml
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
version: "3.7"
volumes:
image-storage:
driver: local
driver_opts:
type: none
device: "${PWD}/preview-images"
o: bind
networks:
entry:
services:
database:
container_name: howtocards-database
image: postgres:11.5
restart: always
volumes:
- /usr/local/var/howtocards/postgres:/var/lib/postgresql/data
networks:
- entry
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
expose:
- "5432"
ports:
- 5432:5432
public-api:
container_name: howtocards-public-api
image: docker.pkg.github.com/howtocards/backend/public-api:latest
restart: always
expose:
- "9000"
depends_on:
- database
networks:
- entry
environment:
RUST_LOG: info
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
PREVIEW_QUEUE_URL: http://preview-queue:8080
POSTGRES_DB: ${POSTGRES_DB}
DATABASE_HOST: database
DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@database/${POSTGRES_DB}
internal-api:
container_name: howtocards-internal-api
image: docker.pkg.github.com/howtocards/backend/internal-api:latest
restart: always
expose:
- "9002"
ports:
- 9002:9002
depends_on:
- database
networks:
- entry
environment:
RUST_LOG: info
LISTEN: 0.0.0.0:9002
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
PREVIEW_QUEUE_URL: http://preview-queue:8080
POSTGRES_DB: ${POSTGRES_DB}
DATABASE_HOST: database
DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@database/${POSTGRES_DB}
frontend:
container_name: howtocards-frontend
image: docker.pkg.github.com/howtocards/frontend/frontend:latest
networks:
- entry
expose:
- "80"
# admin:
# container_name: howtocards-admin
# image: docker.pkg.github.com/howtocards/admin/admin:latest
# networks:
# - entry
# expose: # ???
# - "80"
# - "443"
ssi:
container_name: howtocards-ssi
image: howtocards-ssi
build:
context: ./ssi
dockerfile: Dockerfile
args:
FRONTEND_VERSION: latest
SSI_VERSION: latest
restart: always
expose:
- "4000"
depends_on:
- public-api
networks:
- entry
environment:
RUST_LOG: info
PUBLIC_URL: https://howtocards.io
IMAGE_URL: https://howtocards.io/images
BACKEND_URL: http://public-api:9000
LISTEN_HOST: 0.0.0.0:4000
entry:
container_name: howtocards-entry
image: howtocards-entry
build:
context: ./entry
dockerfile: Dockerfile
restart: always
# healthcheck:
# test: ["CMD", "curl", "-f", "https://howtocards.io"]
ports:
- "80:80"
- "443:443"
networks:
entry:
aliases:
- howtocards.io
depends_on:
- ssi
- frontend
- public-api
volumes:
- /usr/local/var/howtocards/tls/howtocards.crt:/var/lib/howtocards/tls/howtocards.crt
- /usr/local/var/howtocards/tls/howtocards.pem:/var/lib/howtocards/tls/howtocards.pem
- /usr/local/var/howtocards/tls/dhparam.pem:/etc/ssl/certs/dhparam.pem
- image-storage:/images
preview-queue:
container_name: howtocards-preview-queue
image: docker.pkg.github.com/howtocards/preview-queue/preview-queue:latest
restart: always
entrypoint: /app/queue
command:
- "--rabbit.host=queue-rabbit"
- "--rabbit.pass=guest"
- "--rabbit.user=guest"
ports:
- "8080:8080"
depends_on:
- queue-rabbit
networks:
- entry
queue-rabbit:
container_name: howtocards-queue-rabbit
image: rabbitmq:3.7-management
restart: always
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
ports:
- "15672:15672"
- "5672:5672"
volumes:
- /usr/local/var/howtocards/rabbit/queue:/var/lib/rabbitmq
networks:
- entry
image-uploader:
container_name: howtocards-image-uploader
image: docker.pkg.github.com/howtocards/image-uploader/image-uploader:latest
restart: always
environment:
VOLUME: /files
LISTEN_PORT: "5005"
ports:
- "5005:5005"
volumes:
- image-storage:/files
networks:
- entry
preview-worker-1:
container_name: howtocards-preview-worker-1
image: docker.pkg.github.com/howtocards/preview-worker/preview-worker:latest
restart: always
depends_on:
- queue-rabbit
- image-uploader
- entry
- internal-api
networks:
- entry
environment:
CALLBACK_HOST: "http://internal-api:9002"
DEBUG: "worker"
POOL_SIZE: "2"
QUEUE_NAME: event
RABBIT_HOST: "amqp://queue-rabbit:5672"
RENDER_HOST: "https://howtocards.io"
UPLOADER_HOST: "http://image-uploader:5005"