Add docker compose with MinIO and Redis
This commit is contained in:
@@ -3,15 +3,16 @@ version: "3.9"
|
||||
services:
|
||||
minio:
|
||||
image: minio/minio:latest
|
||||
container_name: minio-server
|
||||
container_name: dmf-minio-server
|
||||
restart: always
|
||||
ports:
|
||||
- "5356:9000"
|
||||
- "5357:9001"
|
||||
- "${MINIO_API_PORT}:9000"
|
||||
- "${MINIO_CONSOLE_PORT}:9001"
|
||||
environment:
|
||||
MINIO_ROOT_USER: ${S3_ACCESS_KEY_ID}
|
||||
MINIO_ROOT_PASSWORD: ${S3_SECRET_ACCESS_KEY}
|
||||
volumes:
|
||||
- /home/volochay/coldstorage/minio:/data
|
||||
- "${MINIO_DATA_PATH}:/data"
|
||||
command: server /data --console-address ":9001"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/ready"]
|
||||
@@ -34,3 +35,35 @@ services:
|
||||
mc mb -p local/${BUCKET_NAME} || true &&
|
||||
mc ilm rule add --expire-days 1 local/${BUCKET_NAME}
|
||||
"
|
||||
|
||||
|
||||
redis:
|
||||
image: redis:latest
|
||||
container_name: dmf-redis
|
||||
environment:
|
||||
- REDIS_PASSWORD=${REDIS_PASSWORD}
|
||||
- REDIS_USER=${REDIS_USER}
|
||||
- REDIS_USER_PASSWORD=${REDIS_USER_PASSWORD}
|
||||
ports:
|
||||
- "${REDIS_PORT}:6379"
|
||||
volumes:
|
||||
- "${REDIS_DATA_PATH}:/data"
|
||||
command: >
|
||||
sh -c '
|
||||
mkdir -p /usr/local/etc/redis &&
|
||||
echo "bind 0.0.0.0" > /usr/local/etc/redis/redis.conf &&
|
||||
echo "requirepass $REDIS_PASSWORD" >> /usr/local/etc/redis/redis.conf &&
|
||||
echo "appendonly yes" >> /usr/local/etc/redis/redis.conf &&
|
||||
echo "appendfsync everysec" >> /usr/local/etc/redis/redis.conf &&
|
||||
echo "user default on nopass ~* +@all" > /usr/local/etc/redis/users.acl &&
|
||||
echo "user $REDIS_USER on >$REDIS_USER_PASSWORD ~* +@all" >> /usr/local/etc/redis/users.acl &&
|
||||
redis-server /usr/local/etc/redis/redis.conf --aclfile /usr/local/etc/redis/users.acl
|
||||
'
|
||||
healthcheck:
|
||||
test: [ "CMD", "redis-cli", "-a", "$REDIS_PASSWORD", "ping" ]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
restart: unless-stopped
|
||||
tty: true
|
||||
stdin_open: true
|
||||
|
||||
Reference in New Issue
Block a user