-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
163 lines (152 loc) · 3.65 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
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
version: '3.8'
services:
db:
image: postgres:16.3
container_name: dishdash_postgres
environment:
POSTGRES_USER: dishdash
POSTGRES_PASSWORD: dishdash_pass
POSTGRES_DB: dishdash
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
# - ./db_init:/docker-entrypoint-initdb.d
networks:
- app_network
redis:
image: redis:latest
ports:
- "6379:6379"
networks:
- app_network
volumes:
- redis-data:/data
discovery:
image: mirzaeimahdi409/dish_dash_discovery
build:
context: ./discovery
dockerfile: Dockerfile
ports:
- "18761:18761"
networks:
- app_network
restart: always
authentication:
image: mirzaeimahdi409/dish_dash_authentication
build:
context: ./authentication
dockerfile: Dockerfile
ports:
- "8081:8081"
networks:
- app_network
deploy:
replicas: 1
depends_on:
- discovery
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/dishdash
- EUREKA_CLIENT_SERVICEURL_DEFAULTZONE=http://discovery:18761/eureka
- SPRING_REDIS_HOST=redis
restart: always
order:
image: mirzaeimahdi409/dish_dash_order
build:
context: ./order
dockerfile: Dockerfile
networks:
- app_network
deploy:
replicas: 1
depends_on:
- discovery
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/dishdash
- EUREKA_CLIENT_SERVICEURL_DEFAULTZONE=http://discovery:18761/eureka
restart: always
gateway:
image: mirzaeimahdi409/dish_dash_gateway
build:
context: ./gateway
dockerfile: Dockerfile
ports:
- "8083:8083"
networks:
- app_network
deploy:
replicas: 1
depends_on:
- discovery
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/dishdash
- EUREKA_CLIENT_SERVICEURL_DEFAULTZONE=http://discovery:18761/eureka
restart: always
user:
image: mirzaeimahdi409/dish_dash_user
build:
context: ./user
dockerfile: Dockerfile
networks:
- app_network
deploy:
replicas: 1
depends_on:
- discovery
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/dishdash
- EUREKA_CLIENT_SERVICEURL_DEFAULTZONE=http://discovery:18761/eureka
restart: always
delivery:
image: mirzaeimahdi409/dish_dash_delivery
build:
context: ./delivery
dockerfile: Dockerfile
networks:
- app_network
deploy:
replicas: 1
ports:
- "8082:8082"
depends_on:
- discovery
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/dishdash
- EUREKA_CLIENT_SERVICEURL_DEFAULTZONE=http://discovery:18761/eureka
restart: always
product:
image: mirzaeimahdi409/dish_dash_product
build:
context: ./product
dockerfile: Dockerfile
networks:
- app_network
deploy:
replicas: 1
depends_on:
- discovery
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/dishdash
- EUREKA_CLIENT_SERVICEURL_DEFAULTZONE=http://discovery:18761/eureka
restart: always
payment:
image: mirzaeimahdi409/dish_dash_payment
build:
context: ./payment
dockerfile: Dockerfile
networks:
- app_network
deploy:
replicas: 1
depends_on:
- discovery
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/dishdash
- EUREKA_CLIENT_SERVICEURL_DEFAULTZONE=http://discovery:18761/eureka
restart: always
networks:
app_network:
external: true
volumes:
postgres_data:
redis-data: