Optimize docker builds

This commit is contained in:
Michal Kunc 2021-11-19 11:52:09 +01:00
parent 6c1b479bd5
commit b459f5f4b1
Signed by: michal
GPG Key ID: 4CA5FB6559E0BDF8
2 changed files with 6 additions and 2 deletions

View File

@ -1,2 +1,4 @@
.git/ .git/
db-importer/ db-importer/
# poetry
poetry.lock

View File

@ -5,10 +5,12 @@ RUN python3 -m pip install poetry
EXPOSE 5000 EXPOSE 5000
WORKDIR /app WORKDIR /app
COPY db_explorer/ /app/ COPY db_explorer/pyproject.toml /app/
RUN poetry update RUN poetry update
RUN poetry run pip install setuptools RUN poetry run pip install setuptools
COPY db_explorer/ /app/
ENTRYPOINT [ "poetry", "run" ] ENTRYPOINT [ "poetry", "run" ]
CMD [ "gunicorn", "-b=0.0.0.0:5000", "db_explorer:app" ] CMD [ "gunicorn", "-b=0.0.0.0:5000", "db_explorer:app" ]