make listener port in Dockerfile configurable
This commit is contained in:
parent
9fb24741a1
commit
c2a9cfecf1
2 changed files with 12 additions and 2 deletions
|
|
@ -19,7 +19,10 @@ USER 10000:10001
|
||||||
COPY . ./
|
COPY . ./
|
||||||
|
|
||||||
ENV UNWIND_DATA="/data"
|
ENV UNWIND_DATA="/data"
|
||||||
VOLUME ["/data"]
|
VOLUME $UNWIND_DATA
|
||||||
|
|
||||||
|
ENV UNWIND_PORT=8097
|
||||||
|
EXPOSE $UNWIND_PORT
|
||||||
|
|
||||||
ENTRYPOINT ["/var/app/run"]
|
ENTRYPOINT ["/var/app/run"]
|
||||||
CMD ["server"]
|
CMD ["server"]
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,14 @@
|
||||||
#!/bin/sh -eu
|
#!/bin/sh -eu
|
||||||
|
|
||||||
|
: "${UNWIND_PORT:=8097}"
|
||||||
|
|
||||||
cd "$RUN_DIR"
|
cd "$RUN_DIR"
|
||||||
|
|
||||||
[ -z "${DEBUG:-}" ] || set -x
|
[ -z "${DEBUG:-}" ] || set -x
|
||||||
|
|
||||||
exec uvicorn --host 0.0.0.0 --factory unwind:create_app
|
export UNWIND_PORT
|
||||||
|
|
||||||
|
exec uvicorn \
|
||||||
|
--host 0.0.0.0 \
|
||||||
|
--port "$UNWIND_PORT" \
|
||||||
|
--factory unwind:create_app
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue