Skip to content

Commit

Permalink
Add missing CircleCI files
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Mar 31, 2016
1 parent d573d42 commit 29c9aa2
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/postgres_init/1_create_ckan_db.sh
@@ -0,0 +1,6 @@
#!/bin/sh
psql -U postgres -c "CREATE USER ${CKAN_POSTGRES_USER} \
WITH PASSWORD '${CKAN_POSTGRES_PWD}' \
NOSUPERUSER NOCREATEDB NOCREATEROLE;"

createdb -U postgres -e -O ${CKAN_POSTGRES_USER} ${CKAN_POSTGRES_DB} -E utf-8
14 changes: 14 additions & 0 deletions bin/postgres_init/2_create_ckan_datastore_db.sh
@@ -0,0 +1,14 @@
#!/bin/sh
if [ "${CKAN_DATASTORE_POSTGRES_DB}" ]; then
psql -U postgres -c "CREATE USER ${CKAN_DATASTORE_POSTGRES_READ_USER} \
WITH PASSWORD '${CKAN_DATASTORE_POSTGRES_READ_PWD}' \
NOSUPERUSER NOCREATEDB NOCREATEROLE;"

if [ "${CKAN_DATASTORE_POSTGRES_WRITE_USER}" ] && [ "${CKAN_DATASTORE_POSTGRES_WRITE_PWD}" ]; then
psql -U postgres -c "CREATE USER ${CKAN_DATASTORE_POSTGRES_WRITE_USER} \
WITH PASSWORD '${CKAN_DATASTORE_POSTGRES_WRITE_PWD}' \
NOSUPERUSER NOCREATEDB NOCREATEROLE;"
fi

createdb -U postgres -e -O ${CKAN_DATASTORE_POSTGRES_WRITE_USER} ${CKAN_DATASTORE_POSTGRES_DB} -E utf-8
fi
11 changes: 11 additions & 0 deletions bin/solr_init/create_core.sh
@@ -0,0 +1,11 @@
#!/bin/sh
SOLR_HOME=${SOLR_HOME:-/opt/solr}
SOLR_URL=${SOLR_HOST:-http://localhost:8983}
SOLR_CORE=${SOLR_CORE:-ckan}
SOLR_SCHEMA=${SOLR_SCHEMA:-$HOME/ckan/ckan/config/solr/schema.xml}

INSTANCE_DIR=$SOLR_HOME/example/solr/$SOLR_CORE
cp -R $SOLR_HOME/example/solr/collection1 $SOLR_HOME/example/solr/$SOLR_CORE
cp $SOLR_SCHEMA $SOLR_HOME/example/solr/$SOLR_CORE/conf

curl "$SOLR_URL/solr/admin/cores?action=CREATE&name=$SOLR_CORE&instanceDir=$INSTANCE_DIR"

0 comments on commit 29c9aa2

Please sign in to comment.