-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.test.yml
45 lines (45 loc) · 1.08 KB
/
docker-compose.test.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
version: '3.9'
services:
test:
environment:
AWS_ACCESS_KEY_ID: minioadmin
AWS_SECRET_ACCESS_KEY: minioadmin
build:
context: .
dockerfile: test/Dockerfile
entrypoint: >
/bin/sh -c "
/bin/mc config host add myminio http://minio:9000 minioadmin minioadmin;
/bin/mc mb myminio/test-bucket;
go test ./...
"
depends_on:
- minioConf
- mongo
minio:
image: minio/minio
command: server /data
ports:
- "9000:9000"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
minioConf:
image: minio/mc
depends_on:
- minio
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host add myminio http://minio:9000 minioadmin minioadmin;
/usr/bin/mc rm -r --force myminio/test-bucket;
/usr/bin/mc mb myminio/test-bucket;
exit 0;
"
mongo:
image: mongo
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: test123