-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
144 lines (134 loc) · 3.58 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
version: '3.1'
services:
bookworm_redis:
container_name: bookworm-redis
image: redis:6.2.6-alpine
expose:
- 6379
ports:
- "6379:6379"
networks:
- bookworm_network
bookworm_postgres:
container_name: bookworm-postgres
image: bookworm_postgres:latest
build:
context: bookworm_postgres
dockerfile: Dockerfile
expose:
- 5432
ports:
- "5432:5432"
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- ./bookworm_postgres/init:/docker-entrypoint-initdb.d
# command: [ "postgres", "-c", "log_statement=all" ]
networks:
- bookworm_network
bookworm_pgadmin:
container_name: bookworm-pgadmin
image: dpage/pgadmin4:6
depends_on:
- bookworm_postgres
ports:
- "90:80"
environment:
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_DEFAULT_EMAIL}
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_DEFAULT_PASSWORD}
volumes:
- ./pgadmin4/servers.json:/pgadmin4/servers.json
networks:
- bookworm_network
bookworm_keycloak:
container_name: bookworm-keycloak
image: jboss/keycloak:15.1.0
depends_on:
- bookworm_postgres
expose:
- 8080
ports:
- "8080:8080"
environment:
- KEYCLOAK_USER=${KEYCLOAK_USER}
- KEYCLOAK_PASSWORD=${KEYCLOAK_PASSWORD}
- KEYCLOAK_IMPORT=${KEYCLOAK_IMPORT}
- DB_VENDOR=${KEYCLOAK_DB_VENDOR}
- DB_ADDR=${KEYCLOAK_DB_ADDR}
- DB_DATABASE=${KEYCLOAK_DB_DATABASE}
- DB_USER=${KEYCLOAK_DB_USER}
- DB_PASSWORD=${KEYCLOAK_DB_PASSWORD}
volumes:
- ./keycloak/realm-bookworm.json:/tmp/realm-bookworm.json
command: [ "-Dkeycloak.profile.feature.upload_scripts=enabled" ]
networks:
- bookworm_network
# configuration 4 realm data export
# bookworm_keycloak:
# container_name: bookworm-keycloak
# image: jboss/keycloak:15.0.2
# depends_on:
# - bookworm_postgres
# expose:
# - 8080
# ports:
# - "8080:8080"
# environment:
# - KEYCLOAK_USER=${KEYCLOAK_USER}
# - KEYCLOAK_PASSWORD=${KEYCLOAK_PASSWORD}
# - DB_VENDOR=${KEYCLOAK_DB_VENDOR}
# - DB_ADDR=${KEYCLOAK_DB_ADDR}
# - DB_DATABASE=${KEYCLOAK_DB_DATABASE}
# - DB_USER=${KEYCLOAK_DB_USER}
# - DB_PASSWORD=${KEYCLOAK_DB_PASSWORD}
# volumes:
# - /tmp:/tmp
# networks:
# - bookworm_network
bookworm_prometheus:
container_name: bookworm-prometheus
image: bitnami/prometheus:2.31.1-debian-10-r29
depends_on:
- bookworm_backend
ports:
- "9090:9090"
volumes:
- ./prometheus/prometheus.yml:/opt/bitnami/prometheus/conf/prometheus.yml
networks:
- bookworm_network
bookworm_grafana:
container_name: bookworm-grafana
image: grafana/grafana:8.2.6
depends_on:
- bookworm_prometheus
ports:
- "3000:3000"
networks:
- bookworm_network
bookworm_backend:
container_name: bookworm-backend
image: bookworm_backend:latest
# image: bookworm_backend:0.3.1
build:
context: bookworm_backend
dockerfile: Dockerfile
depends_on:
- bookworm_redis
- bookworm_postgres
- bookworm_keycloak
# restart: on-failure
environment:
- SPRING_PROFILES_ACTIVE=${SPRING_PROFILES_ACTIVE}
- WAIT_FOR_HOST=${POSTGRES_HOST}
- WAIT_FOR_PORT=${POSTGRES_PORT}
expose:
- 8000
ports:
- "8000:8000"
networks:
- bookworm_network
networks:
bookworm_network:
driver: bridge