Skip to content

Commit

Permalink
rename hakai-erddap repository
Browse files Browse the repository at this point in the history
  • Loading branch information
JessyBarrette committed Aug 16, 2024
1 parent 964562b commit 0ef18cc
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update-erddap-development-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
username: ${{ secrets.DEV_SERVER_USERNAME }}
passphrase: ${{ secrets.DEV_SERVER_PASSPHRASE }}
key: ${{ secrets.DEV_SERVER_SSH_KEY }}
script: cd ~/hakai-datasets/; bash update-erddap.sh --hardFlag
script: cd ~/hakai-erddap/; bash update-erddap.sh --hardFlag
2 changes: 1 addition & 1 deletion .github/workflows/update-erddap-production-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
username: ${{ secrets.PROD_SERVER_USERNAME }}
passphrase: ${{ secrets.PROD_SERVER_PASSPHRASE }}
key: ${{ secrets.PROD_SERVER_SSH_KEY }}
script: cd ~/hakai-datasets/; bash update-erddap.sh --hardFlag
script: cd ~/hakai-erddap/; bash update-erddap.sh --hardFlag
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ All datasets made available within the `datasets.d` folder in the ERDDAP XML for

Hakai deploy ERDDAP as docker containers by using the [docker-erddap](https://github.com/axiom-data-science/docker-erddap) image. Continuous Integration is handled via the [erddap-deploy actions](https://github.com/HakaiInstitute/erddap-deploy) and the container configuration is handled via [CapRover](https://caprover.com/) applications.

See [GitHub Deployments](https://github.com/HakaiInstitute/hakai-datasets/deployments) for all active deployments maintained via this repository.
See [GitHub Deployments](https://github.com/HakaiInstitute/hakai-erddap/deployments) for all active deployments maintained via this repository.

## Configuration

Expand Down
23 changes: 23 additions & 0 deletions erddap_create_views.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
cat erddap_create_views.sh
#!/bin/sh

#
# Run the views (.sql files) defined in the hakai-datases repo 'views' folder
# Each view corresponds with an erddap dataset
#
# Runs nightly right after the SN views are re-created
#
# Contact Nate if there are issues with this script

git --git-dir hakai-erddap/.git pull

export PGUSER=$(cat .pguser)
export PGPASSWORD=$(cat .pgpass)
export PGHOST=$(cat .pghost)
export PGDATABASE=$(cat .pgdb)
export QUIET=1
{
echo "SET ROLE hakai_admin;"
for f in $HOME/hakai-erddap/views/*.sql;do echo "BEGIN;";cat $f;echo "COMMIT;";done;
echo "GRANT SELECT ON ALL TABLES IN SCHEMA erddap TO hakai_erddap_user;"
} | PGOPTIONS='--client-min-messages=warning' psql -X --quiet --pset pager=off >/dev/null

0 comments on commit 0ef18cc

Please sign in to comment.