diff options
author | Markus Witt <feuerrot@feuerrot.org> | 2019-04-21 23:13:03 +0200 |
---|---|---|
committer | Markus Witt <feuerrot@feuerrot.org> | 2019-05-03 22:36:12 +0200 |
commit | 46e85324df762672718c0a6a5ca60fb247e89e5d (patch) | |
tree | 5c462e5b16ffc3ff9f8e2d52da6263a62351afcb /examples/docker/postgres-init.sh | |
parent | 7df47bdc4e7d7a5f9a14a95069da454f6b890e77 (diff) |
docker: add docker-compose configuration
🔥docker🔥compose🔥
Diffstat (limited to 'examples/docker/postgres-init.sh')
-rw-r--r-- | examples/docker/postgres-init.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/docker/postgres-init.sh b/examples/docker/postgres-init.sh new file mode 100644 index 0000000..a8c59d1 --- /dev/null +++ b/examples/docker/postgres-init.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL + CREATE USER ${TRAVELYNX_DB_USERNAME} PASSWORD '${TRAVELYNX_DB_PASSWORD}'; + CREATE DATABASE ${TRAVELYNX_DB_NAME}; + GRANT ALL PRIVILEGES ON DATABASE ${TRAVELYNX_DB_NAME} TO ${TRAVELYNX_DB_USERNAME}; +EOSQL
\ No newline at end of file |