From: Adam Dullage Date: Fri, 26 Aug 2022 18:08:17 +0000 (+0100) Subject: Add environment variable to control bind port within container X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=492e4421bc6b490b4209c8f7812dfc86bb9c999b;p=flatnotes.git Add environment variable to control bind port within container --- diff --git a/Dockerfile b/Dockerfile index e536bc3..cde22e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 \ @@ -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}" ]