Intégration d'hydra/hydra-passwordless/fake-smtp dans l'infra Docker
This commit is contained in:
3
misc/containers/postgres/Dockerfile
Normal file
3
misc/containers/postgres/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM postgres:12-alpine
|
||||
|
||||
COPY ./initdb.d /docker-entrypoint-initdb.d
|
15
misc/containers/postgres/initdb.d/init-databases.sh
Normal file
15
misc/containers/postgres/initdb.d/init-databases.sh
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
CREATE USER hydra WITH ENCRYPTED PASSWORD 'hydra';
|
||||
CREATE DATABASE hydra;
|
||||
GRANT ALL PRIVILEGES ON DATABASE hydra TO hydra;
|
||||
EOSQL
|
||||
|
||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
CREATE USER daddy WITH ENCRYPTED PASSWORD 'daddy';
|
||||
CREATE DATABASE daddy;
|
||||
GRANT ALL PRIVILEGES ON DATABASE daddy TO daddy;
|
||||
EOSQL
|
Reference in New Issue
Block a user