oidc-fastapi-test/Containerfile

24 lines
588 B
Docker

FROM docker.io/library/python:alpine
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/
COPY . /src
# Sync the project into a new environment, using the frozen lockfile
WORKDIR /src
RUN uv pip install --system .
# Possible to run with:
#CMD ["oidc-test", "--port", "80"]
#CMD ["fastapi", "run", "src/oidc_test/main.py", "--port", "8873", "--root-path", "/oidc-test"]
#
# Running uvicorn is most flexible:
CMD [ \
"uvicorn", \
"oidc_test.main:app", \
"--host", "0.0.0.0", \
"--port", "80", \
"--forwarded-allow-ips", "*", \
"--root-path", "/oidc-test" \
]