oidc-fastapi-test/Containerfile
phil 0464047f8a
All checks were successful
/ build (push) Successful in 5s
/ test (push) Successful in 6s
Container: add demo plugin
2025-02-12 03:21:06 +01:00

26 lines
747 B
Docker

FROM docker.io/library/python:alpine
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/
COPY . /app
# Sync the project into a new environment, using the frozen lockfile
WORKDIR /app
RUN uv pip install --system .
# Add demo plugin
RUN PIP_EXTRA_INDEX_URL=https://pypi.org/simple/ uv pip install --system --index-url https://code.philo.ydns.eu/api/packages/philorg/pypi/simple/ oidc-fastapi-test-petition
# 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", "*" \
]