-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (52 loc) · 1.54 KB
/
docker-compose.yml
File metadata and controls
52 lines (52 loc) · 1.54 KB
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
services:
build-addok-bundle:
build: .
depends_on:
minio:
condition: service_started
minio-init:
condition: service_completed_successfully
environment:
- S3_BUCKET=${S3_BUCKET}
- S3_ENDPOINT_URL=http://minio:9000
- S3_ACCESS_KEY_ID=${S3_ACCESS_KEY_ID}
- S3_SECRET_ACCESS_KEY=${S3_SECRET_ACCESS_KEY}
- S3_REGION=${S3_REGION}
- S3_ADDOK_PATH=${S3_ADDOK_PATH}
- S3_INPUT_FILE_NAME=${S3_INPUT_FILE_NAME}
- S3_OUTPUT_FILE_NAME=${S3_OUTPUT_FILE_NAME}
minio:
image: minio/minio
ports:
- "${MINIO_PORT:-9000}:9000"
- "${MINIO_FRONT_PORT:-90001}:9001"
environment:
- MINIO_ROOT_USER=${MINIO_ROOT_USER}
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}
volumes:
- minio-data:/data
command: server --console-address ":9001" /data
healthcheck:
test: timeout 5s bash -c ':> /dev/tcp/127.0.0.1/9000' || exit 1
start_period: 5s
interval: 10s
timeout: 5s
retries: 2
minio-init:
build:
context: ./minio-init
dockerfile: Dockerfile.dev
image: minio/mc
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
/usr/bin/mc config;
/usr/bin/mc config host add minio http://minio:9000 ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD};
/usr/bin/mc mb minio/${S3_BUCKET};
/usr/bin/mc cp init-data/adresses-addok-france-simplified.ndjson.gz minio/${S3_BUCKET}/${S3_ADDOK_PATH}/${S3_INPUT_FILE_NAME};
exit 0;
"
volumes:
minio-data: