Skip to content

Commit

Permalink
May I - at last - found a solution for minio without the hassle?!
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitmouton committed Nov 2, 2024
1 parent 5ee5c1d commit d5558ff
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 49 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,33 +72,13 @@ jobs:
- 6379:6379
options: >-
-e REDIS_PASSWORD=lotta
minio:
image: lazybit/minio
ports:
- 9000:9000
env:
MINIO_ACCESS_KEY: AKIAIOSFODNN7EXAMPLE
MINIO_SECRET_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
options: >-
--name minio
--health-cmd "curl http://localhost:9000/minio/health/live"
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup minio
run: >
docker run --network host --name minio_setup --entrypoint /bin/bash minio/mc -c "
/usr/bin/mc alias set minio http://localhost:9000 AKIAIOSFODNN7EXAMPLE wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY;
/usr/bin/mc rm -r --force minio/lotta-dev-ugc;
/usr/bin/mc mb minio/lotta-dev-ugc;
/usr/bin/mc anonymous set download minio/lotta-dev-ugc;
exit 0;
"
- name: Setup main branch for reference
if: ${{ github.ref_name != 'main' }}
run: git branch --track main origin/main
Expand Down
23 changes: 7 additions & 16 deletions apps/core-api/docker-compose.services.base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,11 @@ services:
RABBITMQ_DEFAULT_PASS: guest

minio:
image: minio/minio
command: server /data
image: bitnami/minio:2024
ports:
- 9000:9000
environment:
- MINIO_ROOT_USER=AKIAIOSFODNN7EXAMPLE
- MINIO_ROOT_PASSWORD=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

minio_setup:
image: minio/mc
depends_on:
- minio
entrypoint: >
/bin/sh -c "
/usr/bin/mc alias set minio http://minio:9000 AKIAIOSFODNN7EXAMPLE wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY;
/usr/bin/mc rm -r --force minio/lotta-dev-ugc;
/usr/bin/mc mb minio/lotta-dev-ugc;
/usr/bin/mc anonymous set download minio/lotta-dev-ugc;
exit 0;"
MINIO_SERVER_URL: http://localhost:9000
MINIO_ROOT_USER: AKIAIOSFODNN7EXAMPLE
MINIO_ROOT_PASSWORD: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
MINIO_DEFAULT_BUCKETS: 'lotta-dev-ugc:s3:*'
15 changes: 2 additions & 13 deletions apps/core-api/docker-compose.services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,7 @@ services:
file: './docker-compose.services.base.yaml'
service: minio
volumes:
- ./_data/minio:/data
- ./_data/minio:/bitnami/minio/data
ports:
- 9000:9000

minio_setup:
image: minio/mc
depends_on:
- minio
entrypoint: >
/bin/sh -c "
/usr/bin/mc alias set minio http://minio:9000 AKIAIOSFODNN7EXAMPLE wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY;
/usr/bin/mc rm -r --force minio/lotta-dev-ugc;
/usr/bin/mc mb minio/lotta-dev-ugc;
/usr/bin/mc anonymous set download minio/lotta-dev-ugc;
exit 0;"
- 9001:9001

0 comments on commit d5558ff

Please sign in to comment.