-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.yaml
178 lines (167 loc) · 5.52 KB
/
build.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
version: '3'
services:
traefik:
image: 'traefik:v2.5'
command:
- '--api.insecure=true'
- '--providers.docker=true'
- '--providers.docker.exposedbydefault=false'
- '--entrypoints.web.address=:80'
- '--entrypoints.websecure.address=:443'
- '--certificatesresolvers.myresolver.acme.tlschallenge=true'
- '--certificatesresolvers.myresolver.acme.email=whatscookindev@gmail.com'
- '--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json'
ports:
- '80:80'
- '443:443'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock:ro'
- './letsencrypt:/letsencrypt'
restart: always
db:
image: postgres:latest
expose:
- 5432
volumes:
- db-data:/var/lib/postgresql/data
restart: always
minio:
container_name: minio
image: minio/minio:RELEASE.2022-05-26T05-48-41Z
ports:
- 9001:9001
- 9000:9000
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.minio.rule=Host(`minio.repute.social`)'
- 'traefik.http.routers.minio.service=minio'
- 'traefik.http.services.minio.loadbalancer.server.port=9000'
- 'traefik.http.routers.minio.entrypoints=websecure'
- 'traefik.http.routers.minio.tls.certresolver=myresolver'
- 'traefik.http.routers.minio-console.rule=Host(`minio-console.repute.social`)'
- 'traefik.http.routers.minio-console.service=minio-console'
- 'traefik.http.services.minio-console.loadbalancer.server.port=9001'
- 'traefik.http.routers.minio-console.entrypoints=websecure'
- 'traefik.http.routers.minio-console.tls.certresolver=myresolver'
environment:
MINIO_ROOT_USER: ${MINIO_USER}
MINIO_ROOT_PASSWORD: ${MINIO_PASS}
volumes:
- ./${MANIFEST_FILE}:/tmp/manifests/docker-manifest.json
entrypoint: 'sh'
command: -c "mkdir -p /data/manifests && cp /tmp/manifests/docker-manifest.json /data/manifests/manifest.json && minio server /data --console-address ':9001'"
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
interval: 5s
timeout: 5s
retries: 3
restart: always
minio-mc:
container_name: minio-mc
image: minio/mc
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host add myminio https://minio.repute.social dev devdevdev;
/usr/bin/mc mb myminio/manifests;
/usr/bin/mc anonymous set public myminio/manifests;
"
launcher-server:
image: ${REGISTRY_ADDRESS}/launcher-server:latest
build:
context: ./launcher/server
dockerfile: Dockerfile
restart: always
expose:
- 8080
command: yarn start
depends_on:
minio:
condition: service_healthy
recording-oracle:
image: ${REGISTRY_ADDRESS}/recording-oracle:latest
build:
context: ./recording-oracle
dockerfile: Dockerfile
restart: always
expose:
- 3005
command: yarn start
reputation-oracle:
image: ${REGISTRY_ADDRESS}/reputation-oracle:latest
build:
context: ./reputation-oracle
dockerfile: Dockerfile
restart: always
expose:
- 3006
command: yarn start
launcher-service:
image: ${REGISTRY_ADDRESS}/launcher-service:latest
build:
context: ./launcher-service
dockerfile: Dockerfile
restart: always
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.launcher-service.rule=Host(`api.repute.social`)'
- 'traefik.http.routers.launcher-service.entrypoints=websecure'
- 'traefik.http.routers.launcher-service.tls.certresolver=myresolver'
- 'traefik.http.services.launcher-service.loadbalancer.server.port=8082'
ports:
- '8082:8082'
command: /bin/sh "start"
depends_on:
- db
- minio
- reputation-oracle
- recording-oracle
- launcher-server
- rabbitmq
launcher-client:
image: ${REGISTRY_ADDRESS}/launcher-client:latest
build:
context: ./launcher/client
dockerfile: Dockerfile
restart: always
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.launcher-client.rule=Host(`launcher.repute.social`)'
- 'traefik.http.routers.launcher-client.entrypoints=websecure'
- 'traefik.http.routers.launcher-client.tls.certresolver=myresolver'
- 'traefik.http.services.launcher-client.loadbalancer.server.port=3000'
ports:
- '3000:3000'
command: yarn start
depends_on:
- launcher-service
exchange-client:
image: ${REGISTRY_ADDRESS}/exchange-client:latest
build:
context: ./exchange
dockerfile: Dockerfile
restart: always
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.exchange-client.rule=Host(`exchange.repute.social`)'
- 'traefik.http.routers.exchange-client.entrypoints=websecure'
- 'traefik.http.routers.exchange-client.tls.certresolver=myresolver'
- 'traefik.http.services.exchange-client.loadbalancer.server.port=3001'
ports:
- '3001:3001'
command: yarn start
depends_on:
- launcher-service
rabbitmq:
image: rabbitmq:3-management
restart: always
volumes:
- rabbitmq_data:/var/lib/rabbitmq
environment:
- RABBITMQ_DEFAULT_USER=${RABBITMQ_DEFAULT_USER}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_DEFAULT_PASS}
volumes:
db-data:
rabbitmq_data: