mirror of
https://github.com/MatthewL246/pretendo-docker.git
synced 2026-04-28 19:36:56 -05:00
This change is necessary because some games need to connect to a S3 server directly, and MinIO is limited to listening on one domain for virtual hosts.
21 lines
518 B
Bash
21 lines
518 B
Bash
#! /bin/sh
|
|
|
|
set -eu
|
|
|
|
while ! mc alias set minio http://minio.pretendo.cc "$MINIO_ROOT_USER" "$MINIO_ROOT_PASSWORD" >/dev/null 2>&1; do
|
|
echo "Waiting for MinIO to start..."
|
|
sleep 1
|
|
done
|
|
|
|
buckets="pn-cdn pn-boss super-mario-maker"
|
|
|
|
# Create buckets and allow public access
|
|
for bucket in $buckets; do
|
|
if ! mc ls "minio/$bucket" >/dev/null 2>&1; then
|
|
mc mb "minio/$bucket"
|
|
mc anonymous set download "minio/$bucket"
|
|
else
|
|
echo "Bucket $bucket already exists. Skipping..."
|
|
fi
|
|
done
|