[Unit] Description=Flask Princely-Acts web appliance After=network.target [Service] User={{ system_user }} Group={{ system_user }} WorkingDirectory=/opt/app Environment="PATH=/opt/app/.env/bin" Environment="FLASK_ENV=production" #Environment="FLASK_ENV=development" # use in development environment #Environment="FLASK_APP=index.py" #ExecStart="flask run" #ExecStart=/opt/app/.venv/bin/flask run ExecStart=/opt/app/.venv/bin/gunicorn -w 3 -b 127.0.0.1:5000 app:app [Install] WantedBy=multi-user.target