forked from uselagoon/lagoon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
225 lines (225 loc) · 10 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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
version: '3.2'
services:
api-db:
image: ${IMAGE_REPO:-lagoon}/api-db
ports:
- '3366:3306'
webhook-handler:
image: ${IMAGE_REPO:-lagoon}/webhook-handler
command: yarn run dev
ports:
- '7777:3000'
volumes:
- ./services/webhook-handler/src:/app/services/webhook-handler/src
- ./node-packages:/app/node-packages:delegated
environment:
- CONSOLE_LOGGING_LEVEL=trace
backup-handler:
image: ${IMAGE_REPO:-lagoon}/backup-handler
restart: on-failure
ports:
- '7778:3000'
depends_on:
- broker
broker:
image: ${IMAGE_REPO:-lagoon}/broker
ports:
- '15672:15672'
- '5672:5672'
logs2notifications:
image: ${IMAGE_REPO:-lagoon}/logs2notifications
environment:
- S3_FILES_HOST=http://172.17.0.1:9000
mailhog:
image: mailhog/mailhog
platform: linux/amd64
ports:
- '32025:8025'
webhooks2tasks:
image: ${IMAGE_REPO:-lagoon}/webhooks2tasks
command: yarn run dev
volumes:
- ./services/webhooks2tasks/src:/app/services/webhooks2tasks/src
- ./node-packages:/app/node-packages:delegated
environment:
- CONSOLE_LOGGING_LEVEL=trace
api-db-init:
image: ${IMAGE_REPO:-lagoon}/api
command: >
sh -c "./node_modules/.bin/knex migrate:list --cwd /app/services/api/database
&& ./node_modules/.bin/knex migrate:latest --cwd /app/services/api/database"
volumes:
- ./services/api/database:/app/services/api/database
- ./node-packages:/app/node-packages:delegated
- /app/node-packages/commons/dist
depends_on:
api-db:
condition: service_started
keycloak:
condition: service_started
api-lagoon-migrations:
image: ${IMAGE_REPO:-lagoon}/api
command: sh -c "./node_modules/.bin/tsc && node -r dotenv-extended/config dist/migrations/lagoon/migration.js"
volumes:
- ./services/api/src:/app/services/api/src
environment:
- KEYCLOAK_URL=http://172.17.0.1:8088
- NODE_ENV=development
- CONSOLE_LOGGING_LEVEL=trace
depends_on:
api-db-init:
condition: service_completed_successfully # don't start the lagoon migrations until the db migrations is completed
keycloak:
condition: service_started
api:
image: ${IMAGE_REPO:-lagoon}/api
command: ./node_modules/.bin/tsc-watch --build --incremental --onSuccess "node -r dotenv-extended/config dist/index"
volumes:
- ./services/api/src:/app/services/api/src
- ./node-packages:/app/node-packages:delegated
- /app/node-packages/commons/dist
environment:
- KEYCLOAK_URL=http://172.17.0.1:8088
- NODE_ENV=development
- OPENSEARCH_INTEGRATION_ENABLED=false
- DISABLE_CORE_HARBOR=true
- CI=${CI:-true}
- REGISTRY=harbor.172.17.0.1.nip.io:18080 # Docker network bridge and forwarded port for harbor-nginx
- S3_FILES_HOST=http://172.17.0.1:9000
- S3_BAAS_ACCESS_KEY_ID=minio
- S3_BAAS_SECRET_ACCESS_KEY=minio123
- CONSOLE_LOGGING_LEVEL=debug
depends_on:
api-lagoon-migrations:
condition: service_started
keycloak:
condition: service_started
ports:
- '3000:3000'
# Uncomment for local new relic tracking
# environment:
# - NEW_RELIC_LICENSE_KEY=
# - NEW_RELIC_APP_NAME=api-local
ui:
# use the organizations pr for the ui
image: uselagoon/ui:main
command: yarn run dev
environment:
- NODE_ENV=development
- KEYCLOAK_API=http://localhost:8088/auth
- GRAPHQL_API=http://localhost:3000/graphql
ports:
- '8888:3003'
actions-handler:
image: ${IMAGE_REPO:-lagoon}/actions-handler
restart: on-failure
depends_on:
- broker
ssh:
image: ${IMAGE_REPO:-lagoon}/ssh
depends_on:
- api
- auth-server
ports:
- '2020:2020'
# command:
# - "/usr/sbin/sshd"
# - "-e"
# - "-ddd"
# - "-f"
# - "/etc/ssh/sshd_config"
user: '111111111'
volumes:
- ./services/ssh/home/command.sh:/home/command.sh
- ./services/ssh/home/rsh.sh:/home/rsh.sh
auth-server:
image: ${IMAGE_REPO:-lagoon}/auth-server
command: yarn run dev
environment:
- JWTISSUER=auth-server.dev
- JWTAUDIENCE=api.dev
- CONSOLE_LOGGING_LEVEL=trace
volumes:
- ./services/auth-server/src:/app/services/auth-server/src
ports:
- '3001:3000'
keycloak:
image: ${IMAGE_REPO:-lagoon}/keycloak
user: '111111111'
depends_on:
- keycloak-db
ports:
- '8088:8080'
environment:
- KEYCLOAK_FRONTEND_URL=http://localhost:8088/auth/
# Uncomment for local new relic tracking
# - NEW_RELIC_LICENSE_KEY=
# - NEW_RELIC_APP_NAME=keycloak-local
volumes:
- "./services/keycloak/profile.properties:/opt/jboss/keycloak/standalone/configuration/profile.properties"
- "./services/keycloak/startup-scripts:/opt/jboss/startup-scripts"
- "./services/keycloak/themes/lagoon:/opt/jboss/keycloak/themes/lagoon"
- "./local-dev/keycloak:/lagoon/keycloak"
keycloak-db:
image: ${IMAGE_REPO:-lagoon}/keycloak-db
ports:
- '3336:3306'
tests-kubernetes:
image: ${IMAGE_REPO:-lagoon}/tests
environment:
- CLUSTER_TYPE=control-k8s
- WEBHOOK_HOST=webhook-handler
- WEBHOOK_PORT=3000
- WEBHOOK_PROTOCOL=http
- ROUTE_SUFFIX_HTTP=172.17.0.1.nip.io
- ROUTE_SUFFIX_HTTP_PORT=18080
- ROUTE_SUFFIX_HTTPS=172.17.0.1.nip.io
- ROUTE_SUFF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Phlnt\nL6J5iAoqoDKICzjcgF5x3mj9YFWZrC3aRxRrN5RoEgeVdcXeK56UJqXHjmKN++m3\nc8OPEIBZiD8UJuhSNSOLiBFrGz6toy6rpHavqqknGhVWotXsAs1h8LNkBe8=\n-----END RSA PRIVATE KEY-----
- SSH_HOST=ssh
- SSH_PORT=2020
- API_HOST=api
- API_PROTOCOL=http
- API_PORT=3000
- KEYCLOAK_AUTH_SERVER_CLIENT_SECRET=f605b150-7636-4447-abd3-70988786b330
- DELETED_STATUS_CODE=404
volumes:
- ./tests:/ansible
remotedev:
image: jhen0409/remotedev-server
platform: linux/amd64
command: node main.js
environment:
- ADAPTER=
- PORT=9090
ports:
- '9090:9090'
local-api-data-watcher-pusher:
depends_on:
- api
image: ${IMAGE_REPO:-lagoon}/local-api-data-watcher-pusher
environment:
- CLEAR_API_DATA=false
volumes:
- ./local-dev/api-data-watcher-pusher:/home
local-minio:
image: minio/minio
entrypoint: sh
command: -c 'mkdir -p /export/restores && mkdir -p /export/lagoon-files && mkdir -p /export/harbor-images && minio server /export --console-address ":9001" '
ports:
- '9000:9000'
- '9001:9001'
environment:
- MINIO_ROOT_USER=minio
- MINIO_ROOT_PASSWORD=minio123
drush-alias:
image: uselagoon/drush-alias:latest
ports:
- '8087:8080'
labels:
version: '2'
api-redis:
image: ${IMAGE_REPO:-lagoon}/api-redis