-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
114 lines (113 loc) · 2.37 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
version: '3.9'
services:
rabbitmq:
image: rabbitmq:4.0.0
container_name: rabbitmq
ports:
- 5672
- 15672
volumes:
- ./data/rabbitmq/data/:/var/lib/rabbitmq/
- ./data/rabbitmq/log/:/var/log/rabbitmq/
front-end:
build:
context: ./conazon-front-end/
dockerfile: Dockerfile
ports:
- 3000
container_name: front-end
env_file:
- .env
users-and-auth:
build:
context: ./conazon-users-and-auth/
dockerfile: Dockerfile
container_name: users-and-auth
env_file:
- .env.backend
ports:
- 8080
links:
- postgres
- rabbitmq
depends_on:
rabbitmq:
condition: service_started
restart: unless-stopped
products:
build:
context: ./conazon-products/
dockerfile: Dockerfile
container_name: products
env_file:
- .env.backend
ports:
- 8081
links:
- postgres
- rabbitmq
depends_on:
rabbitmq:
condition: service_started
restart: unless-stopped
cart:
build:
context: ./conazon-cart/
dockerfile: Dockerfile
container_name: cart
env_file:
- .env.backend
ports:
- 8082
links:
- postgres
- rabbitmq
depends_on:
rabbitmq:
condition: service_started
restart: unless-stopped
checkout:
build:
context: ./conazon-checkout/
dockerfile: Dockerfile
container_name: checkout
env_file:
- .env.backend
ports:
- 8083
links:
- postgres
- rabbitmq
depends_on:
rabbitmq:
condition: service_started
restart: unless-stopped
nginx:
image: nginx:stable-alpine3.19
container_name: nginx
ports:
- 80:80
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
users-and-auth:
condition: service_started
products:
condition: service_started
cart:
condition: service_started
checkout:
condition: service_started
restart: unless-stopped
postgres:
image: postgres:16-alpine
container_name: postgres
ports:
- 5432
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
- POSTGRES_USER=postgres
- POSTGRES_DB=conazon
volumes:
- ./data/db:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql