-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
123 lines (115 loc) · 2.98 KB
/
docker-compose.dev.yml
File metadata and controls
123 lines (115 loc) · 2.98 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
version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:16-alpine
container_name: battlepass-postgres-dev
environment:
POSTGRES_DB: battlepass
POSTGRES_USER: battlepass
POSTGRES_PASSWORD: battlepass123
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U battlepass"]
interval: 10s
timeout: 5s
retries: 5
networks:
- battlepass-network
# Redis Cache
redis:
image: redis:7-alpine
container_name: battlepass-redis-dev
command: redis-server --appendonly yes
volumes:
- redis_data:/data
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
networks:
- battlepass-network
# RabbitMQ Message Broker
rabbitmq:
image: rabbitmq:3-management-alpine
container_name: battlepass-rabbitmq-dev
environment:
RABBITMQ_DEFAULT_USER: battlepass
RABBITMQ_DEFAULT_PASS: battlepass123
volumes:
- rabbitmq_data:/var/lib/rabbitmq
ports:
- "5672:5672" # AMQP port
- "15672:15672" # Management UI
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- battlepass-network
# API Gateway
api-gateway:
build:
context: .
dockerfile: packages/api-gateway/Dockerfile
container_name: battlepass-api-gateway-dev
environment:
NODE_ENV: development
PORT: 3000
DATABASE_URL: postgresql://battlepass:battlepass123@postgres:5432/battlepass?schema=public
RABBITMQ_URL: amqp://battlepass:battlepass123@rabbitmq:5672
LOG_LEVEL: info
ports:
- "3000:3000"
depends_on:
postgres:
condition: service_healthy
rabbitmq:
condition: service_healthy
networks:
- battlepass-network
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
retries: 3
# Identity Service
identity-service:
build:
context: .
dockerfile: packages/identity-service/Dockerfile
container_name: battlepass-identity-service-dev
environment:
NODE_ENV: development
PORT: 3001
DATABASE_URL: postgresql://battlepass:battlepass123@postgres:5432/battlepass?schema=public
RABBITMQ_URL: amqp://battlepass:battlepass123@rabbitmq:5672
LOG_LEVEL: info
ports:
- "3001:3001"
depends_on:
postgres:
condition: service_healthy
rabbitmq:
condition: service_healthy
networks:
- battlepass-network
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3001/health"]
interval: 30s
timeout: 10s
retries: 3
volumes:
postgres_data:
redis_data:
rabbitmq_data:
networks:
battlepass-network:
driver: bridge