-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
84 lines (74 loc) · 2.21 KB
/
Copy pathdocker-compose.yml
File metadata and controls
84 lines (74 loc) · 2.21 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
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
x-shared-env: &shared-env
REDIS_PORT: ${REDIS_PORT:-6379}
REDIS_PASSWORD: ${REDIS_PASSWORD}
REDIS_DATABASE: ${REDIS_DATABASE:-0}
REDIS_URL: redis://:${REDIS_PASSWORD}@redis:${REDIS_PORT:-6379}/${REDIS_DATABASE:-0}
S3_ENDPOINT: http://minio:9000
RESULTS_S3_ACCESS_ID: ${RESULTS_S3_ACCESS_ID}
RESULTS_S3_KEY: ${RESULTS_S3_KEY}
RESULTS_S3_BUCKET: ${RESULTS_S3_BUCKET}
NO_PROXY: ${NO_PROXY}
AWS_REQUEST_CHECKSUM_CALCULATION: "when_required"
AWS_RESPONSE_CHECKSUM_VALIDATION: "when_required"
APP_VERSION: 'dev-local'
services:
redis:
image: redis:8.10-alpine
restart: unless-stopped
ports:
- "${REDIS_PORT}:${REDIS_PORT}"
command: >
redis-server
--port ${REDIS_PORT}
--appendonly yes
--requirepass ${REDIS_PASSWORD}
healthcheck:
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD} ping| grep PONG"]
interval: 10s
timeout: 5s
retries: 5
networks:
- ast-net
volumes:
- redis-data:/data
# Object Storage infrastructure
minio:
image: quay.io/minio/minio:latest
ports:
- "9000:9000" # S3 API Port
- "9001:9001" # Web Console Port
environment:
- MINIO_ROOT_USER=${RESULTS_S3_ACCESS_ID:-local-access-key}
- MINIO_ROOT_PASSWORD=${RESULTS_S3_KEY:-local-secret-key}
command: server /data --console-address ":9001"
healthcheck:
test: ["CMD-SHELL","curl -f http://localhost:9000/minio/health/live || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
volumes:
- minio-data:/data
networks:
- ast-net
minio-setup:
image: quay.io/minio/mc:latest
depends_on:
- minio
entrypoint: >
/bin/sh -c "
until (/usr/bin/mc alias set localS3 http://minio:9000 ${RESULTS_S3_ACCESS_ID:-local-access-key} ${RESULTS_S3_KEY:-local-secret-key}) do echo '...waiting...' && sleep 1; done;
echo 'Creating bucket....';
/usr/bin/mc mb --ignore-existing localS3/${S3_BUCKET:-ast-local};
/usr/bin/mc policy set download localS3/${S3_BUCKET:-ast-local};
echo 'Setup complete';
exit 0;
"
networks:
- ast-net
volumes:
minio-data:
redis-data:
networks:
ast-net:
driver: bridge