Fix uvicorn PATH in Docker - use poetry venv bin directory
This commit is contained in:
parent
11579efb55
commit
fe0689d827
2 changed files with 4 additions and 2 deletions
|
|
@ -33,7 +33,7 @@ services:
|
|||
build:
|
||||
context: .
|
||||
dockerfile: packages/api/Dockerfile
|
||||
command: arq remodel_api.workers.main.WorkerSettings
|
||||
command: python -m arq remodel_api.workers.main.WorkerSettings
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- DATABASE_URL=sqlite:///./remodel.db
|
||||
|
|
|
|||
|
|
@ -12,7 +12,9 @@ COPY packages /app/packages
|
|||
WORKDIR /app/packages/api
|
||||
RUN poetry install --no-interaction
|
||||
|
||||
# Set Python path
|
||||
# Get poetry venv path and set PATH
|
||||
ENV VENV_PATH=/root/.cache/pypoetry/virtualenvs/remodel-api-cufy8KWC-py3.12/bin
|
||||
ENV PATH=$VENV_PATH:$PATH
|
||||
ENV PYTHONPATH=/app/packages/engine/src:/app/packages/api/src
|
||||
|
||||
WORKDIR /app/packages/api
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue