-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
173 lines (164 loc) · 4.58 KB
/
docker-compose.yml
File metadata and controls
173 lines (164 loc) · 4.58 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
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
version: '3.8'
services:
postgres:
image: postgres:15
container_name: colly-postgres
profiles: ["infra"]
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- colly-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:alpine
container_name: colly-redis
profiles: ["infra"]
ports:
- "6379:6379"
networks:
- colly-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
keycloak:
image: quay.io/keycloak/keycloak:23.0
container_name: colly-keycloak
profiles: ["infra"]
environment:
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=admin
- KC_DB=postgres
- KC_DB_URL=jdbc:postgresql://postgres:5432/postgres
- KC_DB_USERNAME=postgres
- KC_DB_PASSWORD=postgres
- KC_HOSTNAME_STRICT=false
- KC_HTTP_ENABLED=true
- KC_HEALTH_ENABLED=true
- KC_HOSTNAME=localhost
- KC_HOSTNAME_PORT=8180
- KC_HOSTNAME_STRICT_HTTPS=false
ports:
- "8180:8080"
depends_on:
postgres:
condition: service_healthy
networks:
- colly-network
command: start-dev
healthcheck:
test: ["CMD-SHELL", "exec 3<>/dev/tcp/localhost/8080 && echo -e 'GET /health/ready HTTP/1.1\\r\\nHost: localhost\\r\\n\\r\\n' >&3 && grep -q '200 OK' <&3"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
inventory-service:
build:
context: ./envgene-inventory-service
dockerfile: Dockerfile
image: envgene-inventory-service:latest
container_name: inventory-service
profiles: ["apps"]
ports:
- "8081:8081"
environment:
- QUARKUS_PROFILE=dev
- QUARKUS_HTTP_PORT=8081
- QUARKUS_REDIS_HOSTS=redis://redis:6379
- QUARKUS_OIDC_AUTH_SERVER_URL=http://host.docker.internal:8180/realms/quarkus
- COLLY_EIS_PROJECT_REPO_URL=https://github.com/ormig/project-git-sample.git
extra_hosts:
- "host.docker.internal:host-gateway"
- "localhost:host-gateway"
depends_on:
redis:
condition: service_healthy
keycloak:
condition: service_healthy
networks:
- colly-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8081/q/swagger-ui"]
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
operational-service:
build:
context: ./environment-operational-service
dockerfile: Dockerfile
image: environment-operational-service:latest
container_name: operational-service
profiles: ["apps"]
ports:
- "8080:8080"
environment:
- QUARKUS_PROFILE=dev
- QUARKUS_REST_CLIENT_ENVGENE_INVENTORY_SERVICE_URL=http://inventory-service:8081
- QUARKUS_REDIS_HOSTS=redis://redis:6379
- QUARKUS_OIDC_AUTH_SERVER_URL=http://host.docker.internal:8180/realms/quarkus
extra_hosts:
- "host.docker.internal:host-gateway"
- "localhost:host-gateway"
depends_on:
redis:
condition: service_healthy
keycloak:
condition: service_healthy
inventory-service:
condition: service_healthy
networks:
- colly-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/q/swagger-ui"]
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
ui-service:
build:
context: ./ui-service
dockerfile: Dockerfile
image: ui-service:latest
container_name: ui-service
profiles: ["apps"]
ports:
- "3000:3000"
environment:
- QUARKUS_PROFILE=dev
- QUARKUS_HTTP_PORT=3000
- QUARKUS_REST_CLIENT_INVENTORY_SERVICE_URL=http://inventory-service:8081
- QUARKUS_REST_CLIENT_OPERATIONAL_SERVICE_URL=http://operational-service:8080
- QUARKUS_OIDC_AUTH_SERVER_URL=http://host.docker.internal:8180/realms/quarkus
extra_hosts:
- "host.docker.internal:host-gateway"
- "localhost:host-gateway"
depends_on:
inventory-service:
condition: service_healthy
operational-service:
condition: service_healthy
networks:
- colly-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/colly/v2/ui-service/health"]
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
networks:
colly-network:
driver: bridge
volumes:
postgres_data: