forked from githubanotaai/new-test-backend-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
102 lines (95 loc) · 2.18 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
91
92
93
94
95
96
97
98
99
100
101
102
version: '3.3'
services:
mongodb:
image: mongo
container_name: mongo
restart: always
ports:
- 27017:27017
logging:
options:
max-size: 1g
environment:
MONGO_INITDB_ROOT_USERNAME: mongoadmin
MONGO_INITDB_ROOT_PASSWORD: mongo
volumes:
- mongo-data:/data/db:rw
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
networks:
- test-network
mongo-express:
image: mongo-express
container_name: mongo-express
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: mongoadmin
ME_CONFIG_MONGODB_ADMINPASSWORD: mongo
ME_CONFIG_MONGODB_SERVER: mongodb
ME_CONFIG_BASICAUTH_USERNAME: mongoadmin
ME_CONFIG_BASICAUTH_PASSWORD: mongo
depends_on:
mongodb:
condition: service_healthy
networks:
- test-network
rabbitmq:
image: rabbitmq:3-management-alpine
container_name: rabbitmq
ports:
- 5672:5672
- 15672:15672
volumes:
- ~/.docker-conf/rabbitmq/data:/var/lib/rabbitmq
- ~/.docker-conf/rabbitmq/log:/var/log/rabbitmq
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 30s
retries: 3
networks:
- test-network
minio:
image: minio/minio:latest
container_name: minio
environment:
MINIO_ROOT_USER: "minioadmin"
MINIO_ROOT_PASSWORD: "miniosecretkey"
volumes:
- ./data:/data
ports:
- 9000:9000
- 9001:9001
command: server /data --console-address ":9001"
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 5s
timeout: 5s
retries: 5
networks:
- test-network
test-backend:
build:
context: .
dockerfile: ./Dockerfile
container_name: test-backend
env_file:
- ./docker.env
ports:
- 8080:8080
depends_on:
mongodb:
condition: service_healthy
rabbitmq:
condition: service_healthy
minio:
condition: service_healthy
networks:
- test-network
volumes:
mongo-data:
name: mongo-data
networks:
test-network:
driver: bridge