Skip to content

Commit

Permalink
Add environment variable to control bind port within container
Browse files Browse the repository at this point in the history
  • Loading branch information
dullage committed Aug 26, 2022
1 parent a63c3ee commit 492e442
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ ARG APP_DIR=/app
ARG DATA_DIR=${APP_DIR}/data

ENV FLATNOTES_PATH=${DATA_DIR}
ENV PORT=80

RUN addgroup \
--gid $GID \
Expand Down Expand Up @@ -51,4 +52,4 @@ RUN pipenv install --deploy --ignore-pipfile
COPY flatnotes ./flatnotes
COPY --from=build --chown=${UID}:${GID} /build/flatnotes/dist ./flatnotes/dist

ENTRYPOINT [ "pipenv", "run", "python", "-m", "uvicorn", "main:app", "--app-dir", "flatnotes", "--host", "0.0.0.0", "--port", "80" ]
ENTRYPOINT [ "pipenv", "run", "python", "-m", "uvicorn", "main:app", "--app-dir", "flatnotes", "--host", "0.0.0.0", "--port", "${PORT}" ]

0 comments on commit 492e442

Please sign in to comment.