cuddle-rust-service-plan/templates/init-user-db.sh

9 lines
248 B
Bash
Raw Permalink Normal View History

#!bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
CREATE USER como WITH PASSWORD 'somenotverysecurepassword';
CREATE DATABASE cuddle;
GRANT ALL PRIVILEGES ON DATABASE cuddle TO cuddle;
EOSQL