feat: dynamic port and host using environment variables

This commit is contained in:
Lounès Ksouri 2022-02-22 08:41:57 +01:00
parent a132387fa8
commit 31bcb32e2d
No known key found for this signature in database
GPG Key ID: CC2EC395FEF53FE0

View File

@ -37,6 +37,9 @@ ENV PATH="$VIRTUAL_ENV/bin:$PATH"
WORKDIR /app
COPY --chown=1000:1000 lnbits /app/lnbits
ENV LNBITS_PORT="5000"
ENV LNBITS_HOST="0.0.0.0"
EXPOSE 5000
CMD ["uvicorn", "lnbits.__main__:app", "--port", "5000", "--host", "0.0.0.0"]
CMD ["sh", "-c", "uvicorn lnbits.__main__:app --port $LNBITS_PORT --host $LNBITS_HOST"]