add Docker

This commit is contained in:
2019-08-04 20:06:12 +02:00
parent e31282e24e
commit 6d7f91e002
10 changed files with 777 additions and 1 deletions

24
docker/postgresql/extension.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
create extension if not exists plpgsql;
create extension if not exists "uuid-ossp";
create extension if not exists pg_trgm;
create extension if not exists pg_stat_statements;
create extension if not exists zombodb;
create extension if not exists pgcrypto;
create database test;
create user test with encrypted password 'test';
grant all privileges on database test to test;
EOSQL
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "test" <<-EOSQL
create extension if not exists plpgsql;
create extension if not exists "uuid-ossp";
create extension if not exists pg_trgm;
create extension if not exists zombodb;
create extension if not exists pgcrypto;
alter schema public owner to test;
EOSQL