-
Notifications
You must be signed in to change notification settings - Fork 351
/
docker-compose.local.yaml
64 lines (60 loc) · 1.89 KB
/
docker-compose.local.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
# Same as docker-compose.yaml but with the backend image version set to build
# from the local Dockerfile. This is useful for development purposes.
version: "3.8"
services:
rabbitmq:
image: rabbitmq:4.0-management
container_name: rabbitmq
ports:
- "5672:5672"
- "15672:15672"
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
restart: always
postgres:
image: postgres:14
container_name: postgres
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: reacher_db
volumes:
- ./backend/postgres_data:/var/lib/postgresql/data
restart: always
worker1:
build:
context: .
dockerfile: backend/Dockerfile
container_name: worker1
ports:
- "8080:8080"
depends_on:
- postgres
- rabbitmq
environment:
RCH__BACKEND_NAME: worker1
RUST_LOG: reacher=info
RCH__WORKER__ENABLE: true
RCH__WORKER__RABBITMQ__URL: amqp://guest:guest@rabbitmq:5672
RCH__WORKER__POSTGRES__DB_URL: postgres://postgres:postgres@postgres:5432/reacher_db
restart: always
worker2:
build:
context: .
dockerfile: backend/Dockerfile
container_name: worker2
ports:
- "8081:8080"
depends_on:
- postgres
- rabbitmq
environment:
RCH__BACKEND_NAME: worker2
RUST_LOG: reacher=info
RCH__WORKER__ENABLE: true
RCH__WORKER__RABBITMQ__URL: amqp://guest:guest@rabbitmq:5672
RCH__WORKER__POSTGRES__DB_URL: postgres://postgres:postgres@postgres:5432/reacher_db
restart: always