Commit 0ad7265c authored by Johannes Bleher's avatar Johannes Bleher 💪
Browse files

Upload New File

parent b929ca48
Loading
Loading
Loading
Loading

CODE/init.sh

0 → 100644
+11 −0
Original line number Diff line number Diff line
#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
    CREATE SCHEMA iex;
    CREATE USER student WITH PASSWORD 'aidaho';
    GRANT CONNECT ON DATABASE aidaho TO student;
    GRANT USAGE ON SCHEMA iex TO student;
    GRANT SELECT ON ALL TABLES IN SCHEMA iex TO student;
    ALTER DEFAULT PRIVILEGES IN SCHEMA iex GRANT SELECT ON TABLES TO student;
EOSQL