Launch EC2 instance, Associate EIP & Deploy Flask App on Ubuntu 24.04 LTS – Tutorial
خطوات تثبيت python3.10 على Ubuntu 24.04
https://gist.github.com/rutcreate/c0041e842f858ceb455b748809763ddb
don’t forget to install
https://pypi.org/project/gunicorn/
service file:
“`
#/etc/systemd/system/flaskapp.service
[Unit]
Description=Gunicorn instance to serve Flask application
After=network.target
[Service]
User=ubuntu
Group=ubuntu
WorkingDirectory=/home/ubuntu/flask_app
Environment=”PATH=/home/ubuntu/flask_app/venv/bin”
ExecStart=/home/ubuntu/flask_app/venv/bin/gunicorn -b 0.0.0.0:8000 main:app
[Install]
WantedBy=multi-user.target
“`
ubuntu
والله الله يباركلك يا معتصم ، شرح وافي وكافي جزاك الله خيرا ❤❤