chore: use wait script to hang api before cache/db/es started

This commit is contained in:
penzai
2020-03-10 16:49:40 +08:00
parent cd5448cc7d
commit 3539b12503
2 changed files with 7 additions and 1 deletions

View File

@@ -36,6 +36,9 @@ RUN pip install --no-cache-dir -r requirements.txt \
&& sed -i "s#redis://127.0.0.1#redis://redis#g" settings.py \
&& sed -i 's#CACHE_REDIS_HOST = "127.0.0.1"#CACHE_REDIS_HOST = "redis"#g' settings.py
ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.7.3/wait /wait
RUN chmod +x /wait
CMD ["bash", "-c", "flask run"]