Skip to content

Commit

Permalink
Add fastapi_server to PYTHONPATH
Browse files Browse the repository at this point in the history
  • Loading branch information
BurnySc2 committed May 31, 2024
1 parent 882cc66 commit b475529
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_fastapi_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ jobs:
script: |
cd /home/${{ env.USERNAME }}
docker compose down
docker compose up
docker compose up -d
deploy_backend_prod:
if: github.ref == 'refs/heads/master'
Expand Down
2 changes: 2 additions & 0 deletions fastapi_server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ RUN poetry install --without dev

COPY . /root/fastapi_server

ENV PYTHONPATH "${PYTHONPATH}:/root/fastapi_server"

CMD ["poetry", "run", "litestar", "run", "--host", "0.0.0.0", "--port", "8000"]
2 changes: 1 addition & 1 deletion fastapi_server/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ services:
convert_audiobook_worker:
image: burnysc2/fastapi_server:latest
container_name: convert_audiobook_worker
command: poetry run python workers/convert_audiobook.py
command: poetry run python "workers/convert_audiobook.py"
pull_policy: always
# Has no volume because all files are temporary
# If changes occur, they will be saved in postgres or minio
Expand Down

0 comments on commit b475529

Please sign in to comment.