Add environment variable to control bind port within container
authorAdam Dullage <redacted>
Fri, 26 Aug 2022 18:08:17 +0000 (19:08 +0100)
committerAdam Dullage <redacted>
Fri, 26 Aug 2022 18:08:17 +0000 (19:08 +0100)
Dockerfile

index e536bc3957285c238c54b67552a5bdb004234d69..cde22e325ff73b9162ae7e93e7bb91512dac2b1d 100644 (file)
@@ -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}" ]
git clone https://git.99rst.org/PROJECT