Skip to content

Commit

Permalink
ci: Update dev sites to use new dabtase dump (#511)
Browse files Browse the repository at this point in the history
  • Loading branch information
kesara authored Oct 1, 2024
1 parent 6e4e383 commit a545c50
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.DO_SPACES_DEV_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DO_SPACES_DEV_ACCESS_KEY }}
run: |
aws s3 cp --quiet --endpoint-url=${{ secrets.DO_SPACES_DEV_ENDPOINT }} s3://wagtail/ietfa.torchbox.latest.gz ietfa.torchbox.latest.gz
aws s3 cp --quiet --endpoint-url=${{ secrets.DO_SPACES_DEV_ENDPOINT }} s3://wagtail/ietfwww.dump ietfwww.dump
aws s3 cp --quiet --endpoint-url=${{ secrets.DO_SPACES_DEV_ENDPOINT }} s3://wagtail/media.tgz media.tgz
- name: Deploy to containers
Expand Down
4 changes: 2 additions & 2 deletions dev/deploy-to-container/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async function main () {
src: [
'docker/db.Dockerfile',
'docker/scripts/db-import.sh',
'ietfa.torchbox.latest.gz'
'ietfwww.dump'
]
}, {
dockerfile: 'docker/db.Dockerfile',
Expand Down Expand Up @@ -154,7 +154,7 @@ async function main () {
`VIRTUAL_PORT=80`,
`DJANGO_SETTINGS_MODULE=ietf.settings.production`,
`PGHOST=ws-db-${branch}`,
`PGDATABASE=torchbox_temp`,
`PGDATABASE=ietfwww`,
`PGUSER=postgres`,
`PGPASSWORD=password`,
`SECRET_KEY=${nanoid(36)}`,
Expand Down
4 changes: 2 additions & 2 deletions docker/scripts/db-import.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ echo "Drop dummy app DB if it exists..."
dropdb -U postgres --if-exists app

echo "Import DB dump into app..."
gzip -d -c ietfa.torchbox.latest.gz | pg_restore -xO --clean --if-exists --create -U "$POSTGRES_USER" -d postgres
pg_restore -xO --clean --if-exists --create -U "$POSTGRES_USER" -d postgres ietfwww.dump

echo "Done!"
echo "Done!"

0 comments on commit a545c50

Please sign in to comment.