Skip to content

Commit

Permalink
fix: moves poetry install after user
Browse files Browse the repository at this point in the history
  • Loading branch information
sennierer authored Mar 12, 2024
1 parent 3956353 commit e455913
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ ARG INSTALL_DEV=false

COPY . /app

RUN bash -c "if [ $INSTALL_DEV == 'true' ] ; then poetry install --no-root ; else poetry install --no-root --only main ; fi"

ENV PYTHONPATH=/app

# chown all the files to the app user
Expand All @@ -45,6 +43,8 @@ RUN chown -R app /usr/local
# Switch to a non-root user, which is recommended by Heroku.
USER app

RUN poetry config virtualenvs.create false
RUN bash -c "if [ $INSTALL_DEV == 'true' ] ; then poetry install --no-root ; else poetry install --no-root --no-dev ; fi"
#
#CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
CMD ["bash", "start.sh"]

0 comments on commit e455913

Please sign in to comment.