An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix: host and reload for uvicorn
Andras Bacsai8b26acc84147
diff --git a/src/lib/buildPacks/python.ts b/src/lib/buildPacks/python.tsindex 5b3b8d7872..cd42d6fd63 100644--- a/src/lib/buildPacks/python.ts+++ b/src/lib/buildPacks/python.ts@@ -34,7 +34,7 @@ const createDockerfile = async (data, image): Promise<void> => {}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<void> => {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+}