-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
83 lines (73 loc) · 1.75 KB
/
docker-compose.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
version: '3.8'
networks:
my-network:
services:
backend-service:
image: docker.jesusyaro.com/nest-ddd-cqrs-example
build:
context: ./ddd-cqrs-example
dockerfile: ./Dockerfile
container_name: backend-container
ports:
- '3000:3000'
networks:
- my-network
rabbitmq-service:
image: rabbitmq:3.9.9-management-alpine
expose:
- '5672'
ports:
- '15672:15672'
networks:
- my-network
redis-service:
image: redis:6.2.6-alpine
expose:
- '6379'
networks:
- my-network
mongo-service:
image: mongo
volumes:
- ./database:/data/db
- ./database/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
ports:
- '27017:27017'
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: password
MONGO_INITDB_DATABASE: my_db
networks:
- my-network
minio-service:
image: minio/minio
# command: bash -c "export MINIO_SERVER_URL=''"
command: server /data
ports:
- 9000:9000
volumes:
- ./storage:/data
networks:
- my-network
environment:
MINIO_ACCESS_KEY: minioaccess
MINIO_SECRET_KEY: miniosecret
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
createbuckets-service:
image: minio/mc
depends_on:
minio-service:
condition: service_healthy
restart: on-failure
entrypoint: >
/bin/sh -c "
/usr/bin/mc alias set myminio http://minio-service:9000 minioaccess miniosecret;
/usr/bin/mc mb myminio/my-bucket;
/usr/bin/mc policy set public myminio/my-bucket;
"
networks:
- my-network