-
Notifications
You must be signed in to change notification settings - Fork 199
/
docker-compose.yml
118 lines (111 loc) · 2.55 KB
/
docker-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
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
version: '3'
services:
db:
image: postgres
restart: always
environment:
POSTGRES_DB: bc
POSTGRES_USER: bc
POSTGRES_PASSWORD: bc
healthcheck:
interval: 10s
retries: 10
test:
[
'CMD-SHELL',
'pg_isready',
'-U',
'${POSTGRES_USER}',
'-P',
'${POSTGRES_PASSWORD}'
]
timeout: 45s
volumes:
- ./pg.sql:/docker-entrypoint-initdb.d/pg.sql
nodejs:
image: brokencrystals
container_name: nodejs
restart: always
deploy:
restart_policy:
condition: on-failure
resources:
limits:
cpus: 3.5
logging:
options:
max-file: '5'
max-size: '10m'
depends_on:
- db
- keycloak
watchtower:
image: containrrr/watchtower
restart: always
logging:
options:
max-file: '5'
max-size: '10m'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --interval 300 --debug
keycloak-db:
image: 'postgres:12.2-alpine'
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password
healthcheck:
interval: 10s
retries: 10
test:
[
'CMD-SHELL',
'pg_isready',
'-U',
'${POSTGRES_USER}',
'-P',
'${POSTGRES_PASSWORD}'
]
timeout: 45s
restart: on-failure
stdin_open: true
tty: true
volumes:
- './keycloak/db:/var/lib/postgresql/data/'
keycloak:
image: jboss/keycloak:latest
volumes:
- './keycloak/imports/realm-export.json:/opt/jboss/keycloak/imports/realm-export.json'
environment:
DB_VENDOR: POSTGRES
DB_ADDR: keycloak-db
DB_DATABASE: keycloak
DB_USER: keycloak
DB_SCHEMA: public
DB_PASSWORD: password
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: Pa55w0rd
KEYCLOAK_IMPORT: /opt/jboss/keycloak/imports/realm-export.json -Dkeycloak.profile.feature.upload_scripts=enabled
PROXY_ADDRESS_FORWARDING: 'true'
KEYCLOAK_FRONTEND_URL: 'https://auth.qa.brokencrystals.com/auth/'
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8080/auth/realms/master']
timeout: 10s
interval: 30s
retries: 3
depends_on:
- keycloak-db
mailcatcher:
image: sj26/mailcatcher
container_name: mailcatcher
restart: always
ports:
- '1080:1080'
- '1025:1025'
logging:
options:
max-file: '5'
max-size: '10m'
volumes:
letsencrypt: