Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3986 from spikeheap/3985_psql_datastore_ro_user
Use shell script for datastore DB creation in Docker
- Loading branch information
Showing
2 changed files
with
8 additions
and
3 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
contrib/docker/postgresql/docker-entrypoint-initdb.d/00_create_datastore.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL | ||
CREATE ROLE datastore_ro NOSUPERUSER NOCREATEDB NOCREATEROLE LOGIN PASSWORD '$DS_RO_PASS'; | ||
CREATE DATABASE datastore OWNER ckan ENCODING 'utf-8'; | ||
GRANT ALL PRIVILEGES ON DATABASE datastore TO ckan; | ||
EOSQL |
3 changes: 0 additions & 3 deletions
3
contrib/docker/postgresql/docker-entrypoint-initdb.d/00_create_datastore.sql
This file was deleted.
Oops, something went wrong.