Skip to content

Commit

Permalink
Add --root-path to docker entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
avillar committed Oct 28, 2024
1 parent cae67ae commit 596a768
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ ENV PREZ_VERSION=${PREZ_VERSION}
ARG VIRTUAL_ENV
ENV VIRTUAL_ENV=${VIRTUAL_ENV} \
PATH=${VIRTUAL_ENV}/bin:/root/.local/bin:${PATH}
ENV FORWARDED_ALLOW_IPS='127.0.0.1'
ENV APP_ROOT_PATH=''

COPY --from=base ${VIRTUAL_ENV} ${VIRTUAL_ENV}

Expand All @@ -52,4 +54,5 @@ WORKDIR /app
# prez module is already built as a package and installed in $VIRTUAL_ENV as a library
COPY main.py pyproject.toml ./

ENTRYPOINT uvicorn prez.app:assemble_app --factory --host=${HOST:-0.0.0.0} --port=${PORT:-8000} --proxy-headers
ENTRYPOINT uvicorn prez.app:assemble_app --factory --host=${HOST:-0.0.0.0} --port=${PORT:-8000} --proxy-headers \
--forwarded-allow-ips=${FORWARDED_ALLOW_IPS} --root-path "${APP_ROOT_PATH}"

0 comments on commit 596a768

Please sign in to comment.