File: ci_setup_postgres.sh

package info (click to toggle)
python-django-pint 0.7.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 432 kB
  • sloc: python: 1,531; makefile: 28; sh: 12
file content (9 lines) | stat: -rwxr-xr-x 775 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
psql -c "create database django_pint;" -U postgres
# Settings done according to tutorial https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-18-04
# Please not you might have to edit your pg_hba.conf in your local installation
# see https://docs.boundlessgeo.com/suite/1.1.1/dataadmin/pgGettingStarted/firstconnect.html#allowing-local-connections
psql -c "CREATE USER django_pint WITH PASSWORD 'not_secure_in_testing';" -U postgres
psql -c "ALTER ROLE django_pint SET client_encoding TO 'utf8';" -U postgres
psql -c "ALTER ROLE django_pint SET timezone TO 'UTC';" -U postgres
psql -c "GRANT ALL PRIVILEGES ON DATABASE django_pint TO django_pint;" -U postgres
psql -c "ALTER ROLE django_pint CREATEDB;" -U postgres