Commit e263cdd9 authored by Tushar's avatar Tushar
Browse files

Automate bucket creation in minio

Showing with 20 additions and 1 deletion
+20 -1
...@@ -7,6 +7,7 @@ FUSIONAUTH_APP_MEMORY=512M ...@@ -7,6 +7,7 @@ FUSIONAUTH_APP_MEMORY=512M
MINIO_USERNAME=workflow-dev MINIO_USERNAME=workflow-dev
MINIO_PASSWORD=workflow-dev MINIO_PASSWORD=workflow-dev
MINIO_BUCKETNAME=affiliationbucket
# central envs # central envs
CENTRAL_USER_EMAIL=chakshu@samagragovernance.in CENTRAL_USER_EMAIL=chakshu@samagragovernance.in
......
...@@ -29,7 +29,11 @@ tasks: ...@@ -29,7 +29,11 @@ tasks:
openMode: tab-after openMode: tab-after
init: | init: |
gp sync-await setup gp sync-await setup
source .env
cd packages/form-manager cd packages/form-manager
echo "MINIO_USERNAME=$MINIO_USERNAME" >> .env
echo "MINIO_PASSWORD=$MINIO_PASSWORD" >> .env
echo "MINIO_BUCKETNAME=$MINIO_BUCKETNAME" >> .env
nvm use 16 nvm use 16
pnpm install pnpm install
command: | command: |
......
...@@ -136,12 +136,25 @@ services: ...@@ -136,12 +136,25 @@ services:
- "9000:9000" - "9000:9000"
- "9001:9001" - "9001:9001"
volumes: volumes:
- ./mnt/cqube_bucket/minio:/data - minio-data:/data
environment: environment:
MINIO_ROOT_USER: ${MINIO_USERNAME} MINIO_ROOT_USER: ${MINIO_USERNAME}
MINIO_ROOT_PASSWORD: ${MINIO_PASSWORD} MINIO_ROOT_PASSWORD: ${MINIO_PASSWORD}
command: server --console-address ":9001" /data command: server --console-address ":9001" /data
createbuckets:
image: minio/mc
depends_on:
- minio
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host add myminio http://minio:9000 ${MINIO_USERNAME} ${MINIO_PASSWORD};
/usr/bin/mc rm -r --force myminio/${MINIO_BUCKETNAME};
/usr/bin/mc mb myminio/${MINIO_BUCKETNAME};
/usr/bin/mc policy download myminio/${MINIO_BUCKETNAME};
exit 0;
"
networks: networks:
db_net: db_net:
driver: bridge driver: bridge
...@@ -152,5 +165,6 @@ networks: ...@@ -152,5 +165,6 @@ networks:
volumes: volumes:
db_data: db_data:
search_data: search_data:
minio-data:
fa-config: fa-config:
minio_storage: {} minio_storage: {}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment