-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
39 lines (39 loc) · 1.52 KB
/
docker-compose.yml
File metadata and controls
39 lines (39 loc) · 1.52 KB
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
# Note this is a development version of the Docker Compose configuration, so there is no web container
# The web service should be run manually, outside of Docker, for easiest development
version: '3.8'
services:
keycloak:
image: 'jboss/keycloak'
container_name: keycloak
depends_on:
- database
ports:
- '127.0.0.1:8080:8080'
environment:
KEYCLOAK_USER: ${KEYCLOAK_USER}
KEYCLOAK_PASSWORD: ${KEYCLOAK_PASSWORD}
KEYCLOAK_IMPORT: /tmp/keycloak/care_quality_dashboard_realm.json
DB_VENDOR: postgres
DB_ADDR: database
DB_USER: cqdashboard
DB_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- ./keycloak:/tmp/keycloak
- ./keycloak/register.ftl:/opt/jboss/keycloak/themes/base/login/register.ftl
- ./keycloak/account.ftl:/opt/jboss/keycloak/themes/keycloak.v2/account/index.ftl
# Note: no need to publish postgres port; all containers running on same network!
database:
image: 'postgres:13.1-alpine'
container_name: database
# XXX: we only publish 5432 in the development version. The production version should NOT publish the db port
ports:
- '127.0.0.1:5432:5432'
environment:
POSTGRES_MULTIPLE_DATABASES: care_quality_dashboard,keycloak,test
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: cqdashboard
volumes:
- ./schema.sql:/docker-entrypoint-initdb.d/schema.txt
- ./setup-db.sh:/docker-entrypoint-initdb.d/setup-db.sh
- ./postgres:/var/lib/postgresql/data
- /etc/passwd:/etc/passwd:ro