Skip to content

Commit

Permalink
FIX IMAGE: Update Dockerfile and start-prod.sh paths
Browse files Browse the repository at this point in the history
  • Loading branch information
fvergaracl committed Feb 7, 2024
1 parent 1838176 commit aed2269
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ RUN poetry config virtualenvs.create false
WORKDIR /app/
# Copy poetry.lock* in case it doesn't exist in the repo
COPY ./pyproject.toml ./poetry.lock* /app/
COPY ./app /app
RUN chmod +x /app/start-dev.sh
RUN chmod +x /app/start-prod.sh
ENV PYTHONPATH=/app
COPY ./app /app/app
RUN chmod +x /app/app/start-dev.sh
RUN chmod +x /app/app/start-prod.sh
ENV PYTHONPATH=/app/app

FROM builder as dev
RUN poetry install --no-root
Expand All @@ -24,4 +24,6 @@ CMD ["bash", "./start-dev.sh"]
FROM builder as prod
RUN poetry install --no-root --no-dev --no-cache
RUN pip install gunicorn
CMD ["bash", "./start-prod.sh"]


CMD ["bash", "./app/start-prod.sh"]
2 changes: 1 addition & 1 deletion app/start-prod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ LOG_LEVEL=${LOG_LEVEL:-info}


# Start Fastapi app
exec gunicorn -k "uvicorn.workers.UvicornWorker" -c "gunicorn_conf.py" "app.main:app"
exec gunicorn -k "uvicorn.workers.UvicornWorker" -c "app/gunicorn_conf.py" "app.main:app"

0 comments on commit aed2269

Please sign in to comment.