-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
60 lines (56 loc) · 1.44 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
services:
postgres:
image: postgres:latest
restart: unless-stopped
env_file: .env
volumes:
- pgdata:/var/lib/postgresql/data
- ./docker/init-db.sh:/docker-entrypoint-initdb.d/init-db.sh
ports:
- 127.0.0.1:${POSTGRES_EXTERNAL_PORT}:5432
networks:
app-network:
ipv4_address: 10.0.0.4
keycloak:
image: quay.io/keycloak/keycloak:latest
env_file: .env
ports:
- 127.0.0.1:${KEYCLOAK_EXTERNAL_PORT}:8080
depends_on:
- postgres
command: "start-dev"
environment:
- KC_HTTP_ENABLED=true
- KC_PROXY_HEADERS=xforwarded
- KC_PROXY_TRUSTED_ADDRESSES=10.0.0.2
- KC_DB=postgres
- KC_DB_PASSWORD=${POSTGRES_KC_PASSWORD}
- KC_DB_USERNAME=${POSTGRES_KC_USER}
- KC_DB_URL=jdbc:postgresql://postgres:5432/${POSTGRES_KC_DB}
networks:
app-network:
ipv4_address: 10.0.0.3
caddy:
image: caddy:latest
env_file: .env
ports:
- 127.0.0.1:${CADDY_EXTERNAL_PORT_HTTP}:80
- 127.0.0.1:${CADDY_EXTERNAL_PORT_HTTPS}:443
- 127.0.0.1:${CADDY_EXTERNAL_PORT_HTTPS}:443/udp
volumes:
- ./caddy/Caddyfile:/etc/caddy/Caddyfile
- ./caddy/data:/data
- ./caddy/config:/config
- ./caddy/ssl:/ssl
networks:
app-network:
ipv4_address: 10.0.0.2
volumes:
pgdata:
networks:
app-network:
driver: bridge
ipam:
config:
- subnet: 10.0.0.0/24
gateway: 10.0.0.1