-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
129 lines (120 loc) · 3.24 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
version: '3.9'
services:
api-gateway:
build:
context: ./api-gateway
dockerfile: Dockerfile
env_file:
- .env
ports:
- "8080:8080" # Map host port 8080 to container port 8080
depends_on:
- student-service
- swagger-application
- payment-service
- openai-service
- service-registry
environment:
EUREKA_CLIENT_SERVICE_URL: http://service-registry:8761/eureka
profiles:
- ${SERVICE_START_PROFILE}
student-service:
build:
context: ./student-service
dockerfile: Dockerfile
env_file:
- .env
ports:
- "8081:8080" # Map host port 8081 to container port 8080
depends_on:
- rabbitmq
- postgres
- keycloak
- service-registry
environment:
EUREKA_CLIENT_SERVICE_URL: http://service-registry:8761/eureka
RABBITMQ_HOST: rabbitmq
RABBITMQ_PORT: 5672
profiles:
- ${SERVICE_START_PROFILE}
swagger-application:
build:
context: ./swagger-application
dockerfile: Dockerfile
ports:
- "8082:8080" # Map host port 8082 to container port 8080
depends_on:
- service-registry
environment:
EUREKA_CLIENT_SERVICE_URL: http://service-registry:8761/eureka
RABBITMQ_HOST: rabbitmq
RABBITMQ_PORT: 5672
profiles:
- ${SERVICE_START_PROFILE}
payment-service:
build:
context: ./payment-service
dockerfile: Dockerfile
ports:
- "8083:8080" # Map host port 8083 to container port 8080
depends_on:
- rabbitmq
- postgres
- keycloak
- service-registry
environment:
EUREKA_CLIENT_SERVICE_URL: http://service-registry:8761/eureka
DB_HOST: postgres
DB_PORT: 5432
profiles:
- ${SERVICE_START_PROFILE}
openai-service:
build:
context: ./openai-service
dockerfile: Dockerfile
ports:
- "8084:8080" # Map host port 8084 to container port 8080
depends_on:
- service-registry
environment:
EUREKA_CLIENT_SERVICE_URL: http://service-registry:8761/eureka
profiles:
- ${SERVICE_START_PROFILE}
service-registry:
build:
context: ./service-registry
dockerfile: Dockerfile
ports:
- "8761:8761" # Map host port 8761 to container port 8761
profiles:
- ${SERVICE_START_PROFILE}
rabbitmq:
image: rabbitmq:3-management
restart: always
container_name: test-rabbitmq
ports:
- "5673:5672" # default ports 5672:5672
- "15673:15672" # default ports 15672:15672
# environment:
# RABBITMQ_DEFAULT_USER: guest error: RABBITMQ_DEFAULT_USER is set but deprecated
# RABBITMQ_DEFAULT_PASS: guest error: RABBITMQ_DEFAULT_PASS is set but deprecated
postgres:
image: postgres
restart: always
container_name: postgres-db
ports:
- "5433:5432" # default ports 5432:5432
environment:
POSTGRES_DB: ${POSTGRESQL_DB}
POSTGRES_USER: ${POSTGRESQL_USER}
POSTGRES_PASSWORD: ${POSTGRESQL_PASS}
keycloak:
container_name: keycloak
image: quay.io/keycloak/keycloak:23.0.4
environment:
KEYCLOAK_ADMIN: ${KEYCLOAK_ADMIN}
KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD}
ports:
- "9090:8080"
command:
- "start-dev"