Add environment variable for PORT (#47)

* Customizable port

* Fix CMD
This commit is contained in:
Attila Szucs
2024-12-16 03:00:17 +01:00
committed by GitHub
parent 4fc0d3bc94
commit cb38d328aa

View File

@@ -8,4 +8,6 @@ RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
COPY ./api /app/api COPY ./api /app/api
CMD ["uvicorn", "api.app:app", "--host", "0.0.0.0", "--port", "80"] ENV PORT 80
CMD ["sh", "-c", "uvicorn api.app:app --host 0.0.0.0 --port ${PORT}"]