-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
111 lines (104 loc) · 2.57 KB
/
Copy pathdocker-compose.yml
File metadata and controls
111 lines (104 loc) · 2.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
version: '3.8'
services:
# MongoDB Database
mongodb:
image: mongo:7
container_name: event-platform-mongodb
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: password
volumes:
- mongo-data:/data/db
networks:
- event-platform-network
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
interval: 10s
timeout: 5s
retries: 5
# Auth Service
auth-service:
build:
context: ./services/auth-service
dockerfile: Dockerfile
container_name: auth-service
ports:
- "4001:4001"
environment:
PORT: 4001
MONGO_URI: mongodb://admin:password@mongodb:27017/auth?authSource=admin
JWT_SECRET: production-secret-key-change-this
NODE_ENV: production
depends_on:
mongodb:
condition: service_healthy
networks:
- event-platform-network
restart: unless-stopped
# Event Service
event-service:
build:
context: ./services/event-service
dockerfile: Dockerfile
container_name: event-service
ports:
- "4002:4002"
environment:
PORT: 4002
MONGO_URI: mongodb://admin:password@mongodb:27017/events?authSource=admin
AUTH_SERVICE_URL: http://auth-service:4001
NODE_ENV: production
depends_on:
mongodb:
condition: service_healthy
auth-service:
condition: service_started
networks:
- event-platform-network
restart: unless-stopped
# Booking Service
booking-service:
build:
context: ./services/booking-service
dockerfile: Dockerfile
container_name: booking-service
ports:
- "4003:4003"
environment:
PORT: 4003
MONGO_URI: mongodb://admin:password@mongodb:27017/bookings?authSource=admin
AUTH_SERVICE_URL: http://auth-service:4001
EVENT_SERVICE_URL: http://event-service:4002
NODE_ENV: production
depends_on:
mongodb:
condition: service_healthy
auth-service:
condition: service_started
event-service:
condition: service_started
networks:
- event-platform-network
restart: unless-stopped
# Frontend
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: frontend
ports:
- "3000:80"
depends_on:
- auth-service
- event-service
- booking-service
networks:
- event-platform-network
restart: unless-stopped
networks:
event-platform-network:
driver: bridge
volumes:
mongo-data: