first commit

This commit is contained in:
2020-07-16 10:51:50 +02:00
commit 0cb77cc6c7
15 changed files with 551 additions and 0 deletions

View File

@ -0,0 +1,3 @@
FROM postgres:12-alpine
COPY ./initdb.d /docker-entrypoint-initdb.d

View File

@ -0,0 +1,10 @@
#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
CREATE USER jwtserver WITH ENCRYPTED PASSWORD 'jwtserver';
CREATE DATABASE jwtserver;
GRANT ALL PRIVILEGES ON DATABASE jwtserver TO jwtserver;
ALTER DATABASE jwtserver OWNER TO jwtserver;
EOSQL