diff --git a/src/lib/buildPacks/python.ts b/src/lib/buildPacks/python.ts index 5b3b8d787..cd42d6fd6 100644 --- a/src/lib/buildPacks/python.ts +++ b/src/lib/buildPacks/python.ts @@ -34,7 +34,7 @@ const createDockerfile = async (data, image): Promise => { } if (pythonWSGI?.toLowerCase() === 'gunicorn') { Dockerfile.push(`RUN pip install gunicorn`); - } else if (pythonWSGI?.toLowerCase() === "uvicorn") { + } else if (pythonWSGI?.toLowerCase() === 'uvicorn') { Dockerfile.push(`RUN pip install uvicorn`); } else if (pythonWSGI?.toLowerCase() === 'uwsgi') { Dockerfile.push(`RUN apk add --no-cache uwsgi-python3`); @@ -52,9 +52,8 @@ const createDockerfile = async (data, image): Promise => { Dockerfile.push(`EXPOSE ${port}`); if (pythonWSGI?.toLowerCase() === 'gunicorn') { Dockerfile.push(`CMD gunicorn -w=4 -b=0.0.0.0:8000 ${pythonModule}:${pythonVariable}`); - } else if (pythonWSGI?.toLowerCase() === "uvicorn") { - Dockerfile.push(`CMD uvicorn ${pythonModule}:${pythonVariable} --reload --port ${port}`); - + } else if (pythonWSGI?.toLowerCase() === 'uvicorn') { + Dockerfile.push(`CMD uvicorn ${pythonModule}:${pythonVariable} --port ${port} --host 0.0.0.0`); } else if (pythonWSGI?.toLowerCase() === 'uwsgi') { Dockerfile.push( `CMD uwsgi --master -p 4 --http-socket 0.0.0.0:8000 --uid uwsgi --plugins python3 --protocol uwsgi --wsgi ${pythonModule}:${pythonVariable}` @@ -74,4 +73,4 @@ export default async function (data) { } catch (error) { throw error; } -} \ No newline at end of file +}