fix: config issues
This commit is contained in:
parent
839eeac2c2
commit
02c936e880
|
|
@ -34,11 +34,11 @@ services:
|
|||
networks:
|
||||
- banatie-network
|
||||
environment:
|
||||
POSTGRES_DB: banatie
|
||||
POSTGRES_DB: banatie_db
|
||||
POSTGRES_USER: banatie_user
|
||||
POSTGRES_PASSWORD: banatie_secure_password
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U banatie_user -d banatie"]
|
||||
test: ["CMD-SHELL", "pg_isready -U banatie_user -d banatie_db"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
|
@ -84,45 +84,46 @@ services:
|
|||
depends_on:
|
||||
minio:
|
||||
condition: service_healthy
|
||||
entrypoint: >
|
||||
/bin/sh -c "
|
||||
echo 'Setting up MinIO alias...';
|
||||
mc alias set storage http://minio:9000 ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD};
|
||||
entrypoint:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
echo 'Setting up MinIO alias...'
|
||||
mc alias set storage http://minio:9000 $${MINIO_ROOT_USER} $${MINIO_ROOT_PASSWORD}
|
||||
|
||||
echo 'Creating main bucket...';
|
||||
mc mb --ignore-existing storage/banatie;
|
||||
echo 'Creating main bucket...'
|
||||
mc mb --ignore-existing storage/banatie
|
||||
|
||||
echo 'Creating service user...';
|
||||
mc admin user add storage banatie_service banatie_service_key_2024;
|
||||
echo 'Creating service user...'
|
||||
mc admin user add storage banatie_service banatie_service_key_2024
|
||||
|
||||
echo 'Attaching readwrite policy to service user...';
|
||||
mc admin policy attach storage readwrite --user=banatie_service;
|
||||
echo 'Attaching readwrite policy to service user...'
|
||||
mc admin policy attach storage readwrite --user=banatie_service
|
||||
|
||||
echo 'Setting up lifecycle policy...';
|
||||
cat > /tmp/lifecycle.json << EOF
|
||||
echo 'Setting up lifecycle policy...'
|
||||
cat > /tmp/lifecycle.json <<'LIFECYCLE'
|
||||
{
|
||||
\"Rules\": [
|
||||
"Rules": [
|
||||
{
|
||||
\"ID\": \"temp-cleanup\",
|
||||
\"Status\": \"Enabled\",
|
||||
\"Filter\": {
|
||||
\"Prefix\": \"temp/\"
|
||||
"ID": "temp-cleanup",
|
||||
"Status": "Enabled",
|
||||
"Filter": {
|
||||
"Prefix": "temp/"
|
||||
},
|
||||
\"Expiration\": {
|
||||
\"Days\": 7
|
||||
"Expiration": {
|
||||
"Days": 7
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
EOF
|
||||
mc ilm import storage/banatie < /tmp/lifecycle.json;
|
||||
LIFECYCLE
|
||||
mc ilm import storage/banatie < /tmp/lifecycle.json
|
||||
|
||||
echo 'Storage initialization completed!';
|
||||
echo 'Bucket: banatie';
|
||||
echo 'Using presigned URLs for secure access';
|
||||
echo 'SNMD mode: Full S3 compatibility enabled';
|
||||
exit 0;
|
||||
"
|
||||
echo 'Storage initialization completed!'
|
||||
echo 'Bucket: banatie'
|
||||
echo 'Using presigned URLs for secure access'
|
||||
echo 'SNMD mode: Full S3 compatibility enabled'
|
||||
exit 0
|
||||
restart: "no"
|
||||
|
||||
networks:
|
||||
|
|
|
|||
Loading…
Reference in New Issue