Fix postres-hstore build
This commit is contained in:
parent
339de35020
commit
0f6fe5002d
|
@ -5,6 +5,6 @@ WORKDIR /code
|
|||
RUN apt-get -y update
|
||||
RUN apt-get -y install libsasl2-dev libldap2-dev libssl-dev
|
||||
ADD requirements.txt /code/
|
||||
RUN pip install -r requirements.txt
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
RUN wget https://github.com/vishnubob/wait-for-it/raw/8ed92e8cab83cfed76ff012ed4a36cef74b28096/wait-for-it.sh -O /usr/local/bin/wait-for-it && chmod +x /usr/local/bin/wait-for-it
|
||||
ADD . /code/
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
FROM postgres:latest
|
||||
MAINTAINER Piotr Dobrowolski
|
||||
ADD create_extension.sh docker-entrypoint-initdb.d/create_extension.sh
|
||||
ADD create_extension.sh /docker-entrypoint-initdb.d/create_extension.sh
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Because both template1 and the user postgres database have already been created,
|
||||
# we need to create the hstore extension in template1 and then recreate the postgres database.
|
||||
#
|
||||
# Running CREATE EXTENSION in both template1 and postgres can lead to
|
||||
# the extensions having different eid's.
|
||||
psql --dbname template1 <<EOSQL
|
||||
psql --dbname template1 -U postgres <<EOSQL
|
||||
CREATE EXTENSION hstore;
|
||||
CREATE EXTENSION ltree;
|
||||
DROP DATABASE $POSTGRES_USER;
|
||||
|
|
Loading…
Reference in New Issue