-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
100 lines (92 loc) · 2.14 KB
/
docker-compose.yaml
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
version: '3.8'
services:
user-service:
build:
context: ./VirtualCPR/user-services
dockerfile: Dockerfile
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
container_name: user_services
restart: always
environment:
DB_USER: "postgres"
DB_PASSWORD: "Rupam#rani1983"
DB_NAME: "user_services"
DB_HOST: "postgres"
DB_PORT: "5432"
volumes:
- user-data:/app/data
networks:
- keploy-network # ✅ Fixed incorrect network format
order-service:
build:
context: ./VirtualCPR/order-services
dockerfile: Dockerfile
ports:
- "8081:8081"
depends_on:
- mongo
container_name: order_services
restart: always
volumes:
- order-data:/app/data
networks:
- keploy-network
payment-service:
build:
context: ./VirtualCPR/payment-services
dockerfile: Dockerfile
container_name: payment_services
ports:
- "8082:8082"
networks:
- keploy-network
notification-service:
build:
context: ./VirtualCPR/notification_services
dockerfile: Dockerfile
container_name: notification_services
ports:
- "8084:8084"
networks:
- keploy-network
postgres:
image: postgres:latest
container_name: postgres
restart: always
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "Rupam#rani1983"
POSTGRES_DB: "user_services"
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- keploy-network
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres -d user_services" ]
interval: 5s
timeout: 3s
retries: 3
mongo:
image: "mongo"
container_name: mongoDB
ports:
- "27017:27017"
networks:
- keploy-network
volumes:
- mongo-data:/data/db # Ensure MongoDB data is stored properly
volumes:
user-data:
order-data:
mongo-data:
postgres-data: # ✅ Added the missing postgres-data volume
networks:
keploy-network:
external: true