mirror of
https://github.com/TakeusV1/flask_ipam.git
synced 2026-10-13 17:15:33 +02:00
Update install.md
Typo correction and added instructions to update app/_config.py
This commit is contained in:
1 parent
1464767d4e
commit
1c8ec0c159
1 file changed
+6
-2
+6
-2
@@ -2,10 +2,14 @@
|
||||
This documentation is very good, but needs a few changes to make it work (in our case) :
|
||||
https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-22-04<br>
|
||||
|
||||
Before starting the app ensure to intall pip packages in requirements.txt [Section](https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-22-04#step-4-configuring-gunicorn)
|
||||
Before starting the app ensure to install pip packages in requirements.txt Referrenced [Section](https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-22-04#step-4-configuring-gunicorn)
|
||||
- `pip install Flask-Login Flask-SQLAlchemy Flask-WTF mysql-connector-python SQLAlchemy cryptography`
|
||||
- You don't need to create `wsgi.py`, when asked, replace : `wsgi:app` with `'app:create_app()'` .
|
||||
- Update the configuration file under _app/\_config.py_.
|
||||
- `app_ip = '127.0.0.1'` to `app_ip = '0.0.0.0'` for easy web access.
|
||||
- Update **SECRET_KEY='CHANGE_ME'** variable, `openssl rand -hex 32` can be used to create a random key.
|
||||
- You don't need to create or continue with the `wsgi.py` section. When asked, replace: `wsgi:app` with `'app:create_app()'` .
|
||||
- EX : For starting APP with gunicorn : `gunicorn --bind 0.0.0.0:5000 'app:create_app()'`
|
||||
- For any troubleshooting, you can add `--preload` at the end of the command for verbose logging.
|
||||
- In Service File, replace "ExecStart" line with :<br>
|
||||
`ExecStart=/YOUR_ENV_LOCATION/bin/gunicorn --workers 1 --bind 0.0.0.0:5000 -m 007 'app:create_app()'`<br>
|
||||
_(Adjust the number of workers to your needs)_
|
||||
|
||||
Reference in new issue
Block a user