diff --git a/Dockerfile b/Dockerfile index a4d8164..535da61 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,13 +4,13 @@ WORKDIR /app ENV UV_COMPILE_BYTECODE=1 -ADD ./pyproject.toml . -ADD ./uv.lock . -ADD ./src . +ADD pyproject.toml uv.lock . RUN uv sync --frozen --no-dev +ADD /src . + ENV PATH="/app/.venv/bin:$PATH" ENTRYPOINT [] -CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"] \ No newline at end of file +CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"] diff --git a/docker-compose.yml b/docker-compose.yml index e5a7d57..39a49e0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,10 @@ services: - web: + pjl: # Build the image from the Dockerfile in the current directory - build: . + build: + context: . + dockerfile: Dockerfile + image: pjl:0.9 # Host the FastAPI application on port 8000 ports: