WSL/SLF GitLab Repository

Commit c005b2b9 authored by Sam's avatar Sam
Browse files

update compose to reflect new db user

parent 19e80df1
......@@ -2,7 +2,7 @@
CKAN_VERSION=2.9
PYTHON_VERSION=3.9
MAINTAINER=sam.woodcock@protonmail.com
INTERNAL_REG=registry.envidat.ch
INTERNAL_REG=registry.envidat.ch/envidat
EXTERNAL_REG=docker.io
# INJECTED SECRETS
......
......@@ -16,8 +16,8 @@ Use cases:
**.db.secret** contains the postgres connection credentials for
the remote database (for replication), in format:
CKAN_DB_HOST=xxxxxx.wsl.ch
CKAN_DB_NAME=ckan_default
CKAN_DB_USER=ckan_default
CKAN_DB_NAME=envidat
CKAN_DB_USER=xxenvidat
CKAN_DB_PASS=xxxxxx
CKAN_DOI_DB_NAME=envidat_doi
......
......@@ -67,7 +67,7 @@ services:
- ckan-internal
- db-inspect
healthcheck:
test: ["CMD", "pg_isready", "-U", "ckan_default"]
test: ["CMD", "pg_isready", "-U", "$CKAN_DB_USER"]
solr:
container_name: ckan_solr
......
#!/bin/bash
set -eo pipefail
# Create temp dev databases replicating existing databases.
# Uses the postgres superuser account to dump and pipe in PSQL prompt.
# Preferable to SQL create via template, as does not require disconnections.
sudo -u postgres dropdb dev_ckan_default
sudo -u postgres createdb --owner=ckan_default dev_ckan_default
sudo -u postgres pg_dump ckan_default | sudo -u postgres psql dev_ckan_default
sudo -u postgres dropdb dev_envidat_doi
sudo -u postgres createdb --owner=ckan_default dev_envidat_doi
sudo -u postgres pg_dump envidat_doi | sudo -u postgres psql dev_envidat_doi
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment