new: usr: Add opportunity to use profile picture. #4
This commit is contained in:
@@ -8,8 +8,8 @@ until php -r "new PDO('pgsql:host=db;port=5432;dbname=${POSTGRES_DB}', '${POSTGR
|
||||
done
|
||||
echo "[entrypoint] Database is ready."
|
||||
|
||||
echo "[entrypoint] Warming up Symfony cache..."
|
||||
php bin/console cache:warmup
|
||||
echo "[entrypoint] Clearing and warming Symfony cache..."
|
||||
php bin/console cache:clear
|
||||
|
||||
echo "[entrypoint] Running database migrations..."
|
||||
php bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration
|
||||
|
||||
36
docker/minio-init.sh
Executable file
36
docker/minio-init.sh
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
echo "[minio-init] Configuring alias..."
|
||||
mc alias set local http://minio:9000 "$MINIO_ROOT_USER" "$MINIO_ROOT_PASSWORD"
|
||||
|
||||
if mc ls local/mineseeker > /dev/null 2>&1; then
|
||||
echo "[minio-init] Already initialized, skipping."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "[minio-init] Creating bucket 'mineseeker'..."
|
||||
mc mb local/mineseeker
|
||||
|
||||
echo "[minio-init] Creating directories..."
|
||||
echo '' | mc pipe local/mineseeker/media/.keep
|
||||
echo '' | mc pipe local/mineseeker/cache/.keep
|
||||
|
||||
echo "[minio-init] Applying anonymous read policy for media/ and cache/..."
|
||||
printf '%s' '{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Principal": { "AWS": ["*"] },
|
||||
"Action": ["s3:GetObject"],
|
||||
"Resource": [
|
||||
"arn:aws:s3:::mineseeker/media/*",
|
||||
"arn:aws:s3:::mineseeker/cache/*"
|
||||
]
|
||||
}
|
||||
]
|
||||
}' > /tmp/policy.json
|
||||
mc anonymous set-json /tmp/policy.json local/mineseeker
|
||||
|
||||
echo "[minio-init] Done."
|
||||
Reference in New Issue
Block a user