-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
62 lines (60 loc) · 1.5 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
version: '3.4'
volumes:
minio_storage:
services:
## Minio
minio:
image: minio/minio:RELEASE.2023-01-02T09-40-09Z
healthcheck:
test: curl http://minio:9000/minio/health/live
interval: 5s
timeout: 5s
retries: 10
start_period: 2s
ports:
- "9100:9000"
- "9101:9001"
volumes:
- minio_storage:/data
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: miniotest
command: server --console-address ":9001" /data
# Create bucket and upload data
createbucket:
image: minio/mc:RELEASE.2022-12-24T15-21-38Z
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host add myminio http://minio:9000 minio miniotest;
/usr/bin/mc mb myminio/data || true;
/usr/bin/mc mirror /data myminio/data/data/;
exit 0;
"
volumes:
- ./data:/data
## Image Server
image-server:
build:
context: .
target: image
depends_on:
createbucket:
condition: service_completed_successfully
environment:
- SOURCE_STATIC=S3Source
- S3SOURCE_ENDPOINT=http://minio:9000/
- S3SOURCE_ACCESS_KEY_ID=minio
- S3SOURCE_SECRET_KEY=miniotest
- S3SOURCE_BASICLOOKUPSTRATEGY_PATH_PREFIX=data/
- S3SOURCE_BASICLOOKUPSTRATEGY_BUCKET_NAME=data
ports:
- "8182:8182"
healthcheck:
test: curl http://image-server:8182/
interval: 5s
timeout: 5s
retries: 10
start_period: 2s