oidc-fastapi-test/Containerfile

27 lines
761 B
Text
Raw Normal View History

2025-01-09 23:41:32 +01:00
FROM docker.io/library/python:alpine
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/
COPY . /app
2025-01-09 23:41:32 +01:00
# Sync the project into a new environment, using the frozen lockfile
WORKDIR /app
2025-01-09 23:41:32 +01:00
RUN uv pip install --system .
2025-01-09 23:41:32 +01:00
2025-02-12 03:21:06 +01:00
# 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-resource-provider-demo
2025-02-12 03:21:06 +01:00
# 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", \
2025-01-16 05:40:07 +01:00
"--forwarded-allow-ips", "*" \
]