-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
80 lines (75 loc) · 2.57 KB
/
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
# See: https://docs.docker.com/compose/multiple-compose-files/merge/
services:
reverse-proxy:
image: traefik:${APP_TRAEFIK_VERSION-v3.2}
environment:
DOMAIN_NAME: ${APP_DOMAIN_NAME:?}
TRAEFIK_API_INSECURE: "true"
TRAEFIK_ENTRYPOINTS_WEB_ADDRESS: ":80"
TRAEFIK_ENTRYPOINTS_WEBSECURE_ADDRESS: ":443"
TRAEFIK_ENTRYPOINTS_PING_ADDRESS: ":8082"
TRAEFIK_PROVIDERS_FILE_DIRECTORY: "/etc/traefik"
TRAEFIK_PING_ENTRYPOINT: "ping"
TRAEFIK_ACCESSLOG: "true"
TRAEFIK_CERTIFICATESRESOLVERS_RESOLVER0_ACME_HTTPCHALLENGE: "true"
TRAEFIK_CERTIFICATESRESOLVERS_RESOLVER0_ACME_HTTPCHALLENGE_ENTRYPOINT: "web"
TRAEFIK_CERTIFICATESRESOLVERS_RESOLVER0_ACME_EMAIL: ${APP_LETSENCRYPT_EMAIL:?}
TRAEFIK_CERTIFICATESRESOLVERS_RESOLVER0_ACME_STORAGE: "/letsencrypt/acme.json"
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./reverse-proxy:/etc/traefik
swagger-ui:
image: swaggerapi/swagger-ui:${APP_SWAGGER_UI_VERSION-v5.17.3}
depends_on:
- reverse-proxy
- backend-latest
- backend-v1
frontend:
build:
context: frontend
depends_on:
- backend-latest
backend-latest:
build:
context: backend
environment:
APP_API_SPEC_OPTIONS: '{ "servers": [{"url": "/api/latest"}] }'
APP_API_VERSION: latest
APP_DATABASE_USERNAME: ${APP_DATABASE_USERNAME:-user-default}
APP_DATABASE_HOST: database
APP_SECRETS_DIR: /run/secrets
APP_ADMIN_ENTITLEMENTS: ${APP_ADMIN_ENTITLEMENTS:?}
APP_TRUSTED_OP_LIST: ${APP_TRUSTED_OP_LIST:?}
depends_on:
- database
secrets:
- source: database_password
target: app_database_password
backend-v1:
build:
context: backend # Change to backend_v1 submodule with v~=1
environment:
APP_API_SPEC_OPTIONS: '{ "servers": [{"url": "/api/v1"}] }'
APP_API_VERSION: v1
APP_DATABASE_USERNAME: ${APP_DATABASE_USERNAME:-user-default}
APP_DATABASE_HOST: database
APP_SECRETS_DIR: /run/secrets
APP_ADMIN_ENTITLEMENTS: ${APP_ADMIN_ENTITLEMENTS:?}
APP_TRUSTED_OP_LIST: ${APP_TRUSTED_OP_LIST:?}
depends_on:
- database
secrets:
- source: database_password
target: app_database_password
database:
image: mongo:${APP_DATABASE_VERSION-8.0}
environment:
MONGO_INITDB_ROOT_USERNAME: ${APP_DATABASE_USERNAME:-user-default}
MONGO_INITDB_ROOT_PASSWORD_FILE: /run/secrets/password
secrets:
- source: database_password
target: password