From 63a61108d56ba7cdd2bce16171fb941308957d15 Mon Sep 17 00:00:00 2001 From: Anthony Bretaudeau Date: Tue, 21 Mar 2017 11:58:27 +0100 Subject: [PATCH] fix startup error when INSTALL_CHADO_SCHEMA == 0 --- Dockerfile | 3 ++- search.sh | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 search.sh diff --git a/Dockerfile b/Dockerfile index 045c0de..682cf46 100644 --- a/Dockerfile +++ b/Dockerfile @@ -58,4 +58,5 @@ RUN perl Makefile.PL GMOD_ROOT=/usr/share/gmod/ DEFAULTS=1 RECONFIGURE=1 && \ COPY load_schema.sh /docker-entrypoint-initdb.d/00-load_schema.sh COPY load_yeast.sh /docker-entrypoint-initdb.d/01-load_yeast.sh -COPY search.sql /docker-entrypoint-initdb.d/02-search.sql +COPY search.sh /docker-entrypoint-initdb.d/02-search.sh +COPY search.sql /search.sql diff --git a/search.sh b/search.sh new file mode 100644 index 0000000..032f8ee --- /dev/null +++ b/search.sh @@ -0,0 +1,5 @@ +#!/bin/bash +: ${INSTALL_CHADO_SCHEMA:=1} +if [[ $INSTALL_CHADO_SCHEMA -eq 1 ]]; then + psql --username postgres --dbname "$POSTGRES_DB" < /search.sql +fi