-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
90 lines (83 loc) · 1.8 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
services:
rabbitmq:
image: 'rabbitmq:3.13.4-alpine'
healthcheck:
test: nc -z localhost 5672 || exit 1
interval: 30s
timeout: 10s
retries: 4
start_period: 30s
environment:
- RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS=-rabbit heartbeat 900
redis:
image: 'redis:7.2.5-alpine'
healthcheck:
test: redis-cli ping
interval: 30s
timeout: 10s
retries: 4
start_period: 30s
postgres:
image: 'postgres:16.3-alpine3.20'
healthcheck:
test: pg_isready -d postgres -U postgres
interval: 30s
timeout: 10s
retries: 4
start_period: 30s
environment:
- POSTGRES_PASSWORD=pg_password
worker:
build:
dockerfile: Dockerfile
context: ./worker
environment:
- RABBITMQ_HOST=rabbitmq
- RABBITMQ_PORT=5672
- RABBITMQ_USER=guest
- RABBITMQ_PASSWORD=guest
- REDIS_HOST=redis
- REDIS_PORT=6379
depends_on:
- redis
- rabbitmq
restart: on-failure
api:
build:
dockerfile: Dockerfile
context: ./api
environment:
- RABBITMQ_HOST=rabbitmq
- RABBITMQ_PORT=5672
- RABBITMQ_USER=guest
- RABBITMQ_PASSWORD=guest
- REDIS_HOST=redis
- REDIS_PORT=6379
- POSTGRES_USER=postgres
- POSTGRES_HOST=postgres
- POSTGRES_DATABASE=postgres
- POSTGRES_PASSWORD=pg_password
- POSTGRES_PORT=5432
depends_on:
- postgres
- redis
- rabbitmq
restart: on-failure
client:
build:
dockerfile: Dockerfile
context: ./client
depends_on:
- api
stdin_open: true
restart: on-failure
nginx:
restart: always
build:
dockerfile: Dockerfile
context: ./nginx
ports:
- '8080:80'
depends_on:
- api
- client