-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-all.yml
92 lines (84 loc) · 1.75 KB
/
docker-compose-all.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
91
92
version: "3.9"
services:
my-rabbitmq:
image: rabbitmq:3.9.3-management-alpine
container_name: my-rabbitmq
ports:
- 5672:5672
- 15672:15672 # For RabbitMQ GUI
volumes:
- /tmp/devops-app/:/var/lib/rabbitmq:rw
restart: on-failure
networks:
- dev-network
mongodb:
image : mongo:5.0.2
container_name: mongodb
volumes:
- /tmp/mongodb/database:/data/db
ports:
- 27017:27017
restart: on-failure
networks:
- dev-network
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
PUID: 1000
PGID: 1000
redis:
image: redis:6.2
container_name: redis
ports:
- 6379:6379
networks:
- dev-network
eventlistener:
container_name: eventlistener
build:
context: .
dockerfile: Dockerfile-eventlistener
environment:
MONGO_URL: ${MONGO_URL}
AMQP_SERVER_URL: ${AMQP_SERVER_URL}
REDIS_URL: ${REDIS_URL}
restart: on-failure
networks:
- dev-network
depends_on:
- my-rabbitmq
- mongodb
- redis
api:
container_name: api
build:
context: .
dockerfile: Dockerfile-api
ports:
- 8080:8080
environment:
AMQP_SERVER_URL: ${AMQP_SERVER_URL}
MONGO_URL: ${MONGO_URL}
REDIS_URL: ${REDIS_URL}
restart: on-failure
networks:
- dev-network
depends_on:
- mongodb
- my-rabbitmq
- redis
- eventlistener
gateway:
depends_on:
- api
restart: always
build:
dockerfile: Dockerfile-gateway
context: .
ports:
- 80:80
networks:
- dev-network
networks:
dev-network:
driver: bridge