Skip to content

Commit

Permalink
chore(anonymizer): use PGSSLMODE
Browse files Browse the repository at this point in the history
  • Loading branch information
gary-van-woerkens committed Jul 11, 2024
1 parent 4783981 commit fd3f280
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .kontinuous/env/prod/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,13 @@ jobs-restore-anonymous-prod:
secretKeyRef:
name: managed-db-admin-anonymous
key: PGUSER
- name: PGSSLMODE
value: require
run: |
set -e
root_path=domifa-prod-backups/anonymizer/pg_dumps
last_dir=$(aws s3 ls s3://$root_path --recursive | awk '{print $4}' | cut -d "/" -f3 | tail -n 1)
echo "Restoring $last_dir"
aws s3 cp --recursive s3://$root_path/$last_dir /tmp/dump/$last_dir
export PGSSLMODE=disable
pg_restore -h postgresql-77eca822-od41f3361.database.cloud.ovh.net -p 20184 --clean --if-exists --no-owner --role=$PGUSERAPP --no-acl --verbose /tmp/dump/$last_dir --dbname defaultdb --sslmode=require
pg_restore -h postgresql-77eca822-od41f3361.database.cloud.ovh.net -p 20184 --clean --if-exists --no-owner --role=$PGUSERAPP --no-acl --verbose /tmp/dump/$last_dir --dbname defaultdb

0 comments on commit fd3f280

Please sign in to comment.