Add wait-for-it.sh

This commit is contained in:
Stephan Porada 2019-10-23 13:58:27 +02:00
parent f324bc9f3b
commit ad6daa35cc
2 changed files with 4 additions and 0 deletions

View File

@ -23,6 +23,9 @@ COPY config.py opaque.py requirements.txt ./
RUN python -m venv venv && \
venv/bin/pip install -r requirements.txt
# add wait for it
RUN git clone https://github.com/vishnubob/wait-for-it.git /wait-for-it
RUN chmod a+x /wait-for-it/wait-for-it.sh
COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]

View File

@ -1,5 +1,6 @@
#!/bin/sh
/wait-for-it/wait-for-it.sh db:5432 --strict --timeout=0
if [ $# -eq 0 ]
then
venv/bin/python -u opaque.py