(docker-compose) add minio for object storage

We will need object storage to store our document content which comes
as a big json object. Storing it in object storage will offer us
versioning, robustness and scalability.
This commit is contained in:
Samuel Paccoud - DINUM
2024-04-05 20:05:18 +02:00
committed by Anthony LC
parent 397b9efbce
commit 4956beb040
2 changed files with 29 additions and 1 deletions

View File

@@ -330,4 +330,5 @@ build-k8s-cluster: ## build the kubernetes cluster using kind
start-tilt: ## start the kubernetes cluster using kind start-tilt: ## start the kubernetes cluster using kind
tilt up -f ./bin/Tiltfile tilt up -f ./bin/Tiltfile
.PHONY: build-k8s-cluster .PHONY: build-k8s-cluster

View File

@@ -16,6 +16,31 @@ services:
ports: ports:
- "1081:1080" - "1081:1080"
minio:
user: ${DOCKER_USER:-1000}
image: minio/minio
environment:
- MINIO_ROOT_USER=impress
- MINIO_ROOT_PASSWORD=password
ports:
- '9000:9000'
- '9001:9001'
entrypoint: ""
command: minio server --console-address :9001 /data
volumes:
- ./data/media:/data
createbuckets:
image: minio/mc
depends_on:
- minio
entrypoint: >
sh -c "
/usr/bin/mc alias set impress http://minio:9000 impress password && \
/usr/bin/mc mb impress/impress-media-storage && \
/usr/bin/mc version enable impress/impress-media-storage && \
exit 0;"
app-dev: app-dev:
build: build:
context: . context: .
@@ -40,6 +65,7 @@ services:
- postgresql - postgresql
- mailcatcher - mailcatcher
- redis - redis
- createbuckets
celery-dev: celery-dev:
user: ${DOCKER_USER:-1000} user: ${DOCKER_USER:-1000}
@@ -75,6 +101,7 @@ services:
depends_on: depends_on:
- postgresql - postgresql
- redis - redis
- minio
celery: celery:
user: ${DOCKER_USER:-1000} user: ${DOCKER_USER:-1000}