Browse Source

fix service

pull/1/head
squeaky otter 11 months ago
parent
commit
e2fd66e1ae
Signed by: dashie GPG Key ID: C2D57B325840B755
2 changed files with 17 additions and 10 deletions
  1. +13
    -1
      README.md
  2. +4
    -9
      dist/omnomnomnom-web.service

+ 13
- 1
README.md View File

@ -41,4 +41,16 @@ cp /home/omnomnomnom/omnomnomnom/dist/omnomnomnom-web.service /etc/systemd/syste
$EDITOR /etc/systemd/system/
# change paths if needed
systemctl enable omnomnomnom-web
systemctl start omnomnomnom-web
systemctl start omnomnomnom-web
```
Create an user:
```
sudo su - omnomnomnom
cd omnomnomnom
source venv/bin/activate
cd api
flask users create
# if needed:
flask users confirm
```

+ 4
- 9
dist/omnomnomnom-web.service View File

@ -1,20 +1,15 @@
[Unit]
Description=omnomnomnom-web
After=network.target
PartOf=omnomnomnom.target
[Service]
Type=simple
User=omnomnomnom
WorkingDirectory=/home/omnomnomnom/omnomnomnom/api
Environment="FLASK_ENV=production"
# Look at documentation for the configuration part
Environment="APP_SETTINGS='config.production_secret.Config'"
Environment="MIAM_API_IP=127.0.0.1"
Environment="MIAM_API_PORT=5000"
ExecStart=/home/omnomnomnom/omnomnomnom/venv/bin/waitress-serve --host ${MIAM_API_IP} --port ${MIAM_API_PORT} --call app:create_app
Environment=FLASK_ENV=production
Environment=APP_SETTINGS='config.production_secret.Config'
ExecStart=/home/omnomnomnom/omnomnomnom/venv/bin/waitress-serve --host 127.0.0.1 --port 5000 --call 'app:create_app'
TimeoutSec=15
Restart=always
[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target

Loading…
Cancel
Save