This repository has been archived by the owner on Feb 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
84 lines (83 loc) · 1.81 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
version: '3.8'
services:
mongo:
image: mongo
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: admin
MONGO_INITDB_DATABASE: gymshark
MONGODB_ADVERTISED_HOSTNAME: mongo-host
redis:
image: redis:alpine
ports:
- "6379:6379"
rabbitmq:
image: rabbitmq:3-management-alpine
ports:
- "5672:5672"
- "15672:15672"
environment:
RABBITMQ_DEFAULT_USER: test
RABBITMQ_DEFAULT_PASS: test1234!
publisher:
build:
context: .
dockerfile: Dockerfile
target: publisher
environment:
- CRON=*/10 * * * *
- RABBITMQ_HOST=rabbitmq
- RABBITMQ_PORT=5672
- RABBITMQ_USERNAME=test
- RABBITMQ_PASSWORD=test1234!
- RABBITMQ_QUEUE_NAME=items
- BASE_URL=https://hacker-news.firebaseio.com/v0
depends_on:
- rabbitmq
consumer:
build:
context: .
dockerfile: Dockerfile
target: consumer
environment:
- RABBITMQ_HOST=rabbitmq
- RABBITMQ_PORT=5672
- RABBITMQ_USERNAME=test
- RABBITMQ_PASSWORD=test1234!
- RABBITMQ_QUEUE_NAME=items
- GRPC_ADDRESS=grpc:9000
depends_on:
- rabbitmq
- grpc
grpc:
build:
context: .
dockerfile: Dockerfile
target: grpc
ports:
- "9000:9000"
environment:
- GRPC_PORT=9000
- DATABASE_USERNAME=admin
- DATABASE_PASSWORD=admin
- DATABASE_HOST=mongo
- DATABASE_PORT=27017
- DATABASE_NAME=hackernews
- CACHE_ADDRESS=redis:6379
depends_on:
- mongo
- redis
api:
build:
context: .
dockerfile: Dockerfile
target: api
ports:
- "8080:8080"
environment:
- API_ADDRESS=:8080
- GRPC_ADDRESS=grpc:9000
depends_on:
- grpc