-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
89 lines (82 loc) · 1.96 KB
/
docker-compose.yml
File metadata and controls
89 lines (82 loc) · 1.96 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
version: '3.8'
services:
insurance-db:
image: postgres:latest
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${PG_PASSWORD:-postgres}
ports:
- "5432:5432"
profiles:
- prod
redis-cache:
image: redis:latest
ports:
- "6379:6379"
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD:-password}
command: ["redis-server", "--requirepass", "${REDIS_PASSWORD:-password}"]
profiles:
- dev
- prod
keycloak:
image: quay.io/keycloak/keycloak:latest
environment:
DB_VENDOR: POSTGRES
DB_ADDR: insurance-db
DB_DATABASE: postgres
DB_USER: postgres
DB_PASSWORD: ${PG_PASSWORD:-postgres}
KEYCLOAK_ADMIN: admin1
KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD:-aRentetaRmIt}
ports:
- "8080:8080"
command: ["start-dev"]
depends_on:
- insurance-db
profiles:
- prod
insurance-app-dev:
build: .
environment:
SPRING_PROFILES_ACTIVE: dev
REDIS_HOST: redis-cache
REDIS_PORT: 6379
REDIS_PASSWORD: ${REDIS_PASSWORD:-password}
NOTIFICATION_SERVICE_URL: http://notification-service:8082/v1/notification/send
ports:
- "8081:8081"
depends_on:
- redis-cache
profiles:
- dev
insurance-app-prod:
build: .
environment:
SPRING_PROFILES_ACTIVE: prod
REDIS_HOST: redis-cache
REDIS_PORT: 6379
REDIS_PASSWORD: ${REDIS_PASSWORD:-password}
OAUTH2_ISSUER_URI: http://keycloak:8080/realms/myrealm
NOTIFICATION_SERVICE_URL: http://notification-service:8082/v1/notification/send
depends_on:
- insurance-db
- redis-cache
- keycloak
ports:
- "8081:8081"
profiles:
- prod
notification-service:
build: ./notif-svc
environment:
SPRING_PROFILES_ACTIVE: dev
ports:
- "8082:8082"
profiles:
- dev
- prod
networks:
mynetwork:
driver: bridge