-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-run.yml
56 lines (52 loc) · 1.4 KB
/
docker-compose-run.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
services:
keycloak:
environment:
- KC_DB=postgres
- KC_DB_URL_HOST
- KC_DB_USERNAME
- KC_DB_PASSWORD
# Explicitly set the client secret for testing
- OFF_CLIENT_SECRET=Cf4NdSAjZsNO9HLcuXeuvukzFu00roQa
ports:
- "${KEYCLOAK_EXPOSE}${KEYCLOAK_HTTP_PORT}:8080"
- "${KEYCLOAK_EXPOSE}${KEYCLOAK_MANAGEMENT_PORT}:9000"
depends_on:
smtp:
condition: service_started
keycloak_postgres:
condition: service_started
networks:
# Needed to access Redis
shared_network:
keycloak_postgres:
image: postgres:16-alpine
environment:
# PostgreSQL will also create a database with this name
- POSTGRES_USER=${PG_ADMIN_USERNAME}
- POSTGRES_PASSWORD=${PG_ADMIN_PASSWORD}
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${PG_ADMIN_USERNAME}"]
interval: 5s
timeout: 5s
retries: 5
networks:
# Needed so create_user script can connect
shared_network:
smtp:
image: rnwood/smtp4dev:latest
volumes:
- smtpdata:/smtp4dev
ports:
- ${KEYCLOAK_EXPOSE}${SMTP4DEV_PORT}:80
volumes:
smtpdata:
pgdata:
external: true
name: ${COMPOSE_PROJECT_NAME}_pgdata
networks:
# This network allows access to shared services like MongoDB and Redis
shared_network:
name: ${COMMON_NET_NAME}
external: true