-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.base.yml
110 lines (103 loc) · 3.11 KB
/
docker-compose.base.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
version: "3"
volumes:
shared:
driver_opts:
type: tmpfs
device: tmpfs
services:
nginx:
# can be used like seen in production, if you want
#image: ############## path to your built docker images: nginx (local, github/gitlab server, ...) or use build block below ##############
build:
context: ./docker/nginx
dockerfile: nginx.Dockerfile
depends_on:
vault:
condition: service_healthy
mlaps:
condition: service_started
volumes:
- "shared:/shared:ro"
environment:
- NGINX_HOST=mlaps.$YOURCOMPANY.com
- NGINX_PORT=443
mlaps:
# can be used like seen in production, if you want
#image: ############## path to your built docker images: mlaps or use build block below ##############
build:
context: .
dockerfile: docker/mlaps/mlaps.Dockerfile
depends_on:
vault:
condition: service_healthy
db:
condition: service_healthy
extra_hosts:
- "mlaps.$YOURCOMPANY.com:127.0.0.1"
vault:
# can be used like seen in production, if you want
#image: ############## path to your built docker images: vault or use build block below ##############
build:
context: ./docker/vault
dockerfile: vault.Dockerfile
entrypoint: ["/bin/bash", "/init.sh"]
cap_add:
- IPC_LOCK
depends_on:
db:
condition: service_healthy
volumes:
- "./docker/vault/setup.sh:/init.sh:ro"
- "./docker/vault/policy.hcl:/policy.hcl:ro"
- "shared:/tmp/shared:rw"
environment:
- "VAULT_ADDR=http://127.0.0.1:8200"
- "VAULT_DEV_ROOT_TOKEN_ID=dev"
healthcheck:
test: ["CMD", "curl", "http://127.0.0.1:8200/v1/sys/seal-status"]
interval: 10s
retries: 10
start_period: 15s
db:
# only used for testing and development,
# if you want to use this in production, you might want to adjust this
image: mysql:8-debian
command: --default-authentication-plugin=mysql_native_password
restart: always
cap_add:
- SYS_NICE
environment:
MYSQL_ROOT_PASSWORD: dev
MYSQL_USER: dev
MYSQL_PASSWORD: dev
MYSQL_DATABASE: dev
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 2s
retries: 10
keycloak:
# only used for testing and development,
# if you want to use this in production, you might want to adjust this
image: quay.io/keycloak/keycloak
restart: always
command: ["start-dev","-Dkeycloak.migration.action=import",
"-Dkeycloak.migration.provider=singleFile",
"-Dkeycloak.migration.file=/opt/jboss/keycloak/dev.json",
"-Dkeycloak.migration.strategy=OVERWRITE_EXISTING"]
volumes:
- ./docker/keycloak/dev.json:/opt/jboss/keycloak/dev.json
environment:
- DB_VENDOR=H2
- PROXY_ADDRESS_FORWARDING=true
- "KEYCLOAK_ADMIN=dev"
- "KEYCLOAK_ADMIN_PASSWORD=dev"
healthcheck:
test: ["CMD", "curl", "-X", "GET", "http://localhost:8080/auth/admin/realms"]
interval: 10s
retries: 10
timeout: 2s
start_period: 2s
networks:
default:
aliases:
- auth