-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
67 lines (62 loc) · 1.52 KB
/
docker-compose.yml
File metadata and controls
67 lines (62 loc) · 1.52 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
version: '3.9'
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: root
POSTGRES_DB: notification_engine
volumes:
- pg_data:/var/lib/postgresql/data
ports:
- '5433:5432'
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 3s
timeout: 5s
retries: 20
rabbitmq:
image: rabbitmq:3.13-management
ports:
- '5672:5672'
- '15672:15672'
healthcheck:
test: ['CMD', 'rabbitmq-diagnostics', '-q', 'ping']
interval: 10s
timeout: 5s
retries: 10
app:
build:
context: .
dockerfile: Dockerfile
ports:
- '3000:3000'
environment:
DATABASE_URL: postgresql://postgres:root@postgres:5432/notification_engine?schema=public
RABBITMQ_URL: amqp://guest:guest@rabbitmq:5672
volumes:
- .:/app
- /app/node_modules
depends_on:
postgres:
condition: service_healthy
rabbitmq:
condition: service_healthy
worker:
build:
context: .
dockerfile: Dockerfile
environment:
DATABASE_URL: postgresql://postgres:root@postgres:5432/notification_engine?schema=public
RABBITMQ_URL: amqp://guest:guest@rabbitmq:5672
depends_on:
postgres:
condition: service_healthy
rabbitmq:
condition: service_healthy
volumes:
- .:/app
- /app/node_modules
command: ['sh', '/app/entrypoint.sh', 'npm', 'run', 'start:worker:dev']
volumes:
pg_data: