feat(planning): ship holiday-aware planning and assistant upgrades
This commit is contained in:
@@ -2,17 +2,16 @@
|
||||
# Remove SUPERUSER from the application database user
|
||||
# Run after initial setup: bash scripts/harden-postgres.sh
|
||||
|
||||
CONTAINER="planarchy-postgres-1" # Note: container name may still use old naming
|
||||
DB_USER="capakraken"
|
||||
DB_NAME="capakraken"
|
||||
|
||||
echo "Hardening PostgreSQL for $DB_USER..."
|
||||
|
||||
# Remove SUPERUSER privilege
|
||||
docker exec $CONTAINER psql -U postgres -c "ALTER USER $DB_USER NOSUPERUSER;"
|
||||
docker compose exec -T postgres psql -U postgres -c "ALTER USER $DB_USER NOSUPERUSER;"
|
||||
|
||||
# Grant only needed permissions
|
||||
docker exec $CONTAINER psql -U postgres -d $DB_NAME -c "
|
||||
docker compose exec -T postgres psql -U postgres -d $DB_NAME -c "
|
||||
GRANT CONNECT ON DATABASE $DB_NAME TO $DB_USER;
|
||||
GRANT USAGE ON SCHEMA public TO $DB_USER;
|
||||
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO $DB_USER;
|
||||
|
||||
Reference in New Issue
Block a user