Create a PostgreSQL database
Fill in the variables above and set the user’s password in the script:
CREATE USER ${{ USERNAME }} WITH PASSWORD 'put_your_password';CREATE DATABASE ${{ DBNAME }} OWNER ${{ USERNAME }};GRANT ALL PRIVILEGES ON DATABASE ${{ DBNAME }} TO ${{ USERNAME }};\c ${{ DBNAME }}GRANT ALL ON SCHEMA public TO ${{ USERNAME }};Run as superuser (e.g. postgres):
psql -h ${{ HOSTNAME }} -p 5432 -U postgres -f init.sqlOr inline:
psql -h ${{ HOSTNAME }} -p 5432 -U postgres -c "CREATE USER ${{ USERNAME }} WITH PASSWORD 'put_your_password'; CREATE DATABASE ${{ DBNAME }} OWNER ${{ USERNAME }};"