1
0
Fork 0

Fix up dockerfile...

This commit is contained in:
Piotr Dobrowolski 2017-05-10 01:22:56 +02:00
parent 0db7bb46a7
commit 3fe571c32b
3 changed files with 4 additions and 3 deletions

View File

@ -6,4 +6,5 @@ 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 wget https://github.com/vishnubob/wait-for-it/raw/55c54a5abdfb32637b563b28cc088314b162195e/wait-for-it.sh -O /usr/local/bin/wait-for-it && chmod +x /usr/local/bin/wait-for-it
ADD . /code/

View File

@ -1,11 +1,11 @@
version: '2'
version: "3"
services:
db:
build: postgres-hstore
web:
build: .
command: /bin/bash -c "python manage.py migrate && python manage.py runserver 0.0.0.0:8000"
command: wait-for-it db:5432 -- bash -c "python manage.py migrate && python manage.py runserver 0.0.0.0:8000"
volumes:
- .:/code
ports:

View File

@ -3,7 +3,7 @@
#
# Running CREATE EXTENSION in both template1 and postgres can lead to
# the extensions having different eid's.
gosu postgres psql --dbname template1 <<EOSQL
psql --dbname template1 <<EOSQL
CREATE EXTENSION hstore;
CREATE EXTENSION ltree;
DROP DATABASE $POSTGRES_USER;