-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
138 lines (127 loc) · 3.57 KB
/
Copy pathdocker-compose.yml
File metadata and controls
138 lines (127 loc) · 3.57 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
services:
postgres:
image: postgres:16
container_name: hostelhub-postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: admin123
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- hostelhub-network
kafka:
image: apache/kafka:3.7.0
container_name: hostelhub-kafka
environment:
KAFKA_NODE_ID: 1
KAFKA_PROCESS_ROLES: broker,controller
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@kafka:9093
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
ports:
- "9092:9092"
networks:
- hostelhub-network
eureka-server:
build: ./eureka-server
container_name: hostelhub-eureka
ports:
- "8761:8761"
networks:
- hostelhub-network
auth-service:
build: ./auth-service
container_name: hostelhub-auth
ports:
- "8081:8081"
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/hostelhub_auth
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: admin123
EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://eureka-server:8761/eureka/
depends_on:
- postgres
- eureka-server
networks:
- hostelhub-network
complaint-service:
build: ./complaint-service
container_name: hostelhub-complaint
ports:
- "8082:8082"
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/hostelhub_complaint
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: admin123
SPRING_KAFKA_BOOTSTRAP_SERVERS: kafka:9092
EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://eureka-server:8761/eureka/
depends_on:
- postgres
- kafka
- eureka-server
networks:
- hostelhub-network
lost-found-service:
build: ./lost-found-service
container_name: hostelhub-lostfound
ports:
- "8083:8083"
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/hostelhub_lostfound
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: admin123
EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://eureka-server:8761/eureka/
depends_on:
- postgres
- eureka-server
networks:
- hostelhub-network
notification-service:
build: ./notification-service
container_name: hostelhub-notification
ports:
- "8084:8084"
environment:
SPRING_KAFKA_BOOTSTRAP_SERVERS: kafka:9092
EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://eureka-server:8761/eureka/
depends_on:
- kafka
- eureka-server
networks:
- hostelhub-network
api-gateway:
build: ./api-gateway
container_name: hostelhub-gateway
ports:
- "8080:8080"
environment:
EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://eureka-server:8761/eureka/
depends_on:
- eureka-server
- auth-service
- complaint-service
- lost-found-service
- notification-service
networks:
- hostelhub-network
frontend:
build: ./frontend
container_name: hostelhub-frontend
ports:
- "3000:80"
depends_on:
- api-gateway
networks:
- hostelhub-network
volumes:
postgres-data:
networks:
hostelhub-network:
driver: bridge