-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
159 lines (152 loc) · 5.03 KB
/
docker-compose.dev.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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
services:
corn-postgres:
container_name: corn-postgres
image: postgres:alpine
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=none
- POSTGRES_DB=corn
ports:
- "5000:5432"
healthcheck:
test: "pg_isready -U postgres"
interval: 1s
retries: 50
start_period: 5s
timeout: 3s
corn-backend:
container_name: corn-backend
image: corn-backend
depends_on:
corn-postgres:
condition: service_healthy
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=none
- POSTGRES_DB=corn
- SPRING_DATASOURCE_URL=jdbc:postgresql://corn-postgres:5432/corn
- FRONTEND_URL=corn-frontend
- CREATE_PLACEHOLDER_DATA=true
build:
context: corn-backend
dockerfile: Dockerfile.dev
ports:
- "8080:8081"
- "5005:5005"
volumes:
- "./corn-backend:/home/corn"
- "./.cache/corn-backend/.gradle:/home/corn/.gradle"
- "./.cache/corn-backend/build:/home/corn/build"
healthcheck:
test: "curl -f http://localhost:8081/actuator/health"
interval: 2s
retries: 120
start_period: 15s
timeout: 5s
corn-frontend:
container_name: corn-frontend
image: corn-frontend
build:
context: corn-frontend
dockerfile: Dockerfile.dev
ports:
- "4201:4200"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4200"]
interval: 1s
retries: 120
start_period: 15s
timeout: 5s
volumes:
- "./corn-frontend:/corn-frontend"
- "./.cache/corn-frontend/node_modules:/corn-frontend/node_modules"
- "./.cache/corn-frontend/dist:/corn-frontend/dist"
corn-keycloak-initializer:
container_name: corn-keycloak-initializer
image: corn-keycloak-initializer
build:
context: auth-server/keycloak-initializer
dockerfile: Dockerfile.dev
depends_on:
corn-keycloak:
condition: service_healthy
environment:
- KCCFG_OVERRIDE_EXISTING=true
- KCCFG_CREATE_PLACEHOLDER_USERS=true
- KCCFG_LOGIN_THEME_NAME=corn
- KCCFG_ACCOUNT_THEME_NAME=corn
- KC_SERVER_URL=http://corn-keycloak:8080
volumes:
- "./auth-server/keycloak-initializer:/keycloak-initializer"
- "./.cache/keycloak-initializer/.gradle:/keycloak-initializer/.gradle"
- "./.cache/keycloak-initializer/build:/keycloak-initializer/build"
corn-keycloak-theme:
container_name: corn-keycloak-theme
image: corn-keycloak-theme
build:
context: auth-server/keycloak-theme
dockerfile: Dockerfile.dev
depends_on:
corn-keycloak:
condition: service_healthy
tty: true
volumes:
- "./auth-server/keycloak-theme:/keycloak-theme"
- "./.cache/keycloak-theme/node_modules:/keycloak-theme/node_modules"
corn-keycloak:
container_name: corn-keycloak
image: quay.io/keycloak/keycloak:20.0.1
depends_on:
corn-keycloak-postgres:
condition: service_healthy
environment:
- KC_DB=postgres
- KC_DB_URL=jdbc:postgresql://corn-keycloak-postgres:5432/keycloak
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=admin
- KC_DB_USERNAME=keycloak
- KC_DB_PASSWORD=none
command: start-dev
ports:
- '8082:8080'
healthcheck:
test: "curl -f http://localhost:8080/admin || exit 1"
interval: 1s
retries: 120
start_period: 15s
timeout: 5s
volumes:
- "./auth-server/keycloak-theme/themes/corn/:/opt/keycloak/themes/corn/"
corn-keycloak-postgres:
container_name: corn-keycloak-postgres
image: postgres:alpine
environment:
- POSTGRES_DB=keycloak
- POSTGRES_USER=keycloak
- POSTGRES_PASSWORD=none
ports:
- "5001:5432"
healthcheck:
test: "pg_isready -U keycloak"
interval: 1s
retries: 50
start_period: 5s
timeout: 3s
corn-nginx:
container_name: corn-nginx
image: corn-nginx
environment:
- FRONTEND_PORT_CONTAINER=4200
build:
context: nginx
dockerfile: Dockerfile.dev
depends_on:
corn-backend:
condition: service_healthy
corn-frontend:
condition: service_healthy
corn-keycloak:
condition: service_healthy
ports:
- "4200:4200"
- "8081:8080"