development branch created to preserve working deploy project

This commit is contained in:
2025-08-02 17:37:16 +03:00
parent 5e65ea0f7c
commit e824e87953
659 changed files with 90008 additions and 137 deletions
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
set -ex
echo "Starting MinIO bucket setup..."
# Wait for MinIO to be ready
/usr/bin/mc config host add myminio http://minio:9000 kikimor shushunka1
# Damages bucket setup
/usr/bin/mc mb myminio/damages --ignore-existing
echo '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":["*"]},"Action":["s3:GetObject"],"Resource":["arn:aws:s3:::damages/*"]}]}' > /tmp/public_read_damages_policy.json
/usr/bin/mc admin policy add myminio public_read_damages /tmp/public_read_damages_policy.json
/usr/bin/mc admin policy set myminio public_read_damages bucket myminio/damages
# Static bucket setup
/usr/bin/mc rb --force myminio/static || true # Remove static bucket if it exists
/usr/bin/mc mb myminio/static # Recreate static bucket
echo '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":["*"]},"Action":["s3:GetObject"],"Resource":["arn:aws:s3:::static/*"]}]}' > /tmp/public_read_static_policy.json
/usr/bin/mc admin policy add myminio public_read_static /tmp/public_read_static_policy.json
/usr/bin/mc admin policy set myminio public_read_static bucket myminio/static
echo "MinIO bucket setup complete."