-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
90 lines (85 loc) · 2.84 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
90 lines (85 loc) · 2.84 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
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
# THIS IS A COMPOSE PROJECT FOR THE LOCAL MACHINE ONLY!
# DO NOT USE THIS AS A PRODUCTION COMPOSE PROJECT!
# (However, you can use it as a base for what you'll need).
volumes:
postgres_data:
networks:
gpt-network:
driver: bridge
services:
postgres:
container_name: pgsql
image: postgres:latest
ports:
- "5432:5432"
env_file:
- .env
volumes:
- postgres_data:/var/lib/postgresql
- ./init-db.sh:/docker-entrypoint-initdb.d/init-db.sh:ro
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_USER}" ]
interval: 5s
timeout: 5s
retries: 10
networks:
- gpt-network
keycloak:
container_name: keycloak
image: keycloak/keycloak:26.2
command:
- start-dev
- --import-realm
ports:
- "8080:8080"
- "9000:9000"
env_file:
- .env
volumes:
- ./keycloak/:/opt/keycloak/data/import/
environment:
KC_DB: postgres
KC_DB_URL: ${AUTH_DATASOURCE_JDBC_URL}
KC_DB_SCHEMA: public
KC_DB_USERNAME: ${AUTH_DATASOURCE_USER}
KC_DB_PASSWORD: ${AUTH_DATASOURCE_PASSWORD}
KC_BOOTSTRAP_ADMIN_USERNAME: admin
KC_BOOTSTRAP_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD}
KC_HTTP_PORT: 8080
KC_HOSTNAME: http://localhost:7080/auth
KC_HOSTNAME_ADMIN: http://localhost:7080/auth
KC_HOSTNAME_BACKCHANNEL_DYNAMIC: false
KC_HOSTNAME_DEBUG: true
KC_HTTP_RELATIVE_PATH: /auth
KC_HTTP_ENABLED: true
KC_HEALTH_ENABLED: true
KC_METRICS_ENABLED: true
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: [ 'CMD-SHELL', '[ -f /tmp/HealthCheck.java ] || echo "public class HealthCheck { public static void main(String[] args) throws java.lang.Throwable { System.exit(java.net.HttpURLConnection.HTTP_OK == ((java.net.HttpURLConnection)new java.net.URL(args[0]).openConnection()).getResponseCode() ? 0 : 1); } }" > /tmp/HealthCheck.java && java /tmp/HealthCheck.java http://localhost:9000/auth/health/live' ]
interval: 5s
timeout: 5s
retries: 20
networks:
- gpt-network
# Health check this?
nginx:
image: nginx:latest
container_name: nginx
ports:
- "7080:7080"
volumes:
# Mount the stable parent dist/ (shell + ooze remote), NOT the per-app
# browser/ dirs: those are replaced on every `ng build`, which invalidates
# a deeper bind mount and 403s the site until nginx is recreated. nginx
# resolves paths per-request, so it always reads the current subdir here.
- ./angular-client/akira-ng/dist:/usr/share/nginx/dist:ro
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./certs:/etc/ssl/certs:ro
- ./logs:/var/log/nginx
networks:
- gpt-network