-
Notifications
You must be signed in to change notification settings - Fork 11
/
docker-compose.yml
119 lines (110 loc) · 3.19 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
119
# SPDX-FileCopyrightText: 2017-2020 City of Espoo
#
# SPDX-License-Identifier: LGPL-2.1-or-later
# Docker Compose file that can be used for development builds and that links
# against the development Docker files. Do not mistaken these with production
# docker files that the other compose files deal with.
#
# Tips and Tricks
# ===============
#
# If you need to target a local service instead you can use
# a pseudo address docker.for.mac.localhost when running on macOS.
# E.g. to target local application service set APPLICATION_API_URL: http://docker.for.mac.localhost:8080
version: '3.5'
services:
db:
image: ghcr.io/espoon-voltti/evaka/test-db:${TEST_DB_TAG:-master}
build:
context: ./db/
cache_from:
- ghcr.io/espoon-voltti/evaka/test-db:cache-${CACHE_TAG:-master}
- ghcr.io/espoon-voltti/evaka/test-db:cache-master
ports:
- "5432:5432"
volumes:
- db-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
healthcheck:
test: "pg_isready -U postgres"
interval: 2s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
ports:
- "6379:6379"
healthcheck:
test: '[ "$$(redis-cli -h 127.0.0.1 ping)" == "PONG" ]'
interval: 1s
timeout: 5s
retries: 5
s3-mock:
image: adobe/s3mock:3.7.2
ports:
- "9876:9191"
volumes:
- s3-data:/data
environment:
ROOT: /data
initialBuckets: "static"
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:9090"]
interval: 1s
timeout: 5s
retries: 5
keycloak:
image: ghcr.io/espoon-voltti/evaka/keycloak:${TAG:-master}
build:
context: ../keycloak/
cache_from:
- ghcr.io/espoon-voltti/evaka/keycloak:cache-${CACHE_TAG:-master}
- ghcr.io/espoon-voltti/evaka/keycloak:cache-master
ports:
- "8080:8080"
environment:
# Initial admin user via environment, required when running with a container
# https://www.keycloak.org/server/configuration#_creating_the_initial_admin_user
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
# Configuration options
# https://www.keycloak.org/server/all-config?f=config
# Database
KC_DB_URL: "jdbc:postgresql://db/keycloak?user=postgres&password=postgres"
# Hostname v2
KC_HOSTNAME: "http://${KEYCLOAK_HOST:-localhost}:8080/auth/"
KC_HOSTNAME_STRICT: "false"
# HTTP(S)
KC_HTTP_ENABLED: "true"
# Logging
#KC_LOG_LEVEL: "debug"
entrypoint: /configuration/entrypoint.sh
command: ["start", "--optimized", "--log-console-output=json"]
volumes:
- ../keycloak/compose-resources/configuration:/configuration
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/auth/health"]
interval: 2s
timeout: 5s
retries: 5
start_period: 5s
depends_on:
- smtp
- db
- dummy-suomifi
smtp:
image: mailhog/mailhog
ports:
- "8025:8025"
dummy-suomifi:
build:
context: ../keycloak/dummy-suomifi
ports:
- "9000:9000"
volumes:
db-data:
driver: local
s3-data:
driver: local