Recently, In my cpanel, we've installed python 3.7. The default python is 2.7 yet, but I can use python 3.7, simply typing in terminal 'python 3.7<python command>'
the problem is, I dont have the 'setup python app' option, neither 'application manager'. So, I tried to setup by terminal, but I don't know how to do this.
I need to setup a flask API and my first attempt was setup it like I normally setup my localhost
1. I create a directory called: myuser/apis/myapp.
2. Acess it in terminal and create a virtual env in this folder
3. Activate the venv with: source ./venv/bin/activate
4- Install requirements: pip install -r requirements.txt
5- Run app with: flask run

The app seems to working, but my host is: 127.0.0.1:5000 (localhost). How can I set this to my domain and run keep this process running? With my experience with other hosts, I allways use a Procfile serving my app with gunicorn
By the way, I have this app working in digital ocean and the following command is used to serve my app (this is setted by digital ocean automatically):
run_command: GUNICORN_CMD_ARGS="--bind=0.0.0.0:8080 --workers=5" gunicorn server:app
By the way², I don't have root acess, but I can activate venv and install dependencies, so I think I have permission to setup a python process
the problem is, I dont have the 'setup python app' option, neither 'application manager'. So, I tried to setup by terminal, but I don't know how to do this.
I need to setup a flask API and my first attempt was setup it like I normally setup my localhost
1. I create a directory called: myuser/apis/myapp.
2. Acess it in terminal and create a virtual env in this folder
3. Activate the venv with: source ./venv/bin/activate
4- Install requirements: pip install -r requirements.txt
5- Run app with: flask run

The app seems to working, but my host is: 127.0.0.1:5000 (localhost). How can I set this to my domain and run keep this process running? With my experience with other hosts, I allways use a Procfile serving my app with gunicorn
By the way, I have this app working in digital ocean and the following command is used to serve my app (this is setted by digital ocean automatically):
run_command: GUNICORN_CMD_ARGS="--bind=0.0.0.0:8080 --workers=5" gunicorn server:app
By the way², I don't have root acess, but I can activate venv and install dependencies, so I think I have permission to setup a python process
Last edited: