| Line 27: |
Line 27: |
| | | | |
| | ==/etc/systemd/system/example.service== | | ==/etc/systemd/system/example.service== |
| − | <nowiki>[Unit] | + | [Unit] |
| | Description=Tenkaichi Vegeta-server (Tentacle) | | Description=Tenkaichi Vegeta-server (Tentacle) |
| | After=network.target | | After=network.target |
| − |
| + | |
| | [Service] | | [Service] |
| | User=tenkaichi | | User=tenkaichi |
| Line 42: |
Line 42: |
| | RestartSec=3 | | RestartSec=3 |
| | | | |
| − | ExecStart=/usr/local/bin/tentacle_server -o -a ${SERVER_IP} -p ${PORT} -s ${INPUT_DIR} -v -m ${MAX_SIZE} \ | + | ExecStart=/usr/local/bin/tentacle_server -o -a ${SERVER_IP} -p ${PORT} -s ${INPUT_DIR} -v -m ${MAX_SIZE} -e ${SSL_CERT} -k ${SSL_CERTKEY} |
| − | -e ${SSL_CERT} -k ${SSL_CERTKEY}
| |
| | | | |
| | [Install] | | [Install] |
| | WantedBy=multi-user.target | | WantedBy=multi-user.target |
| − | </nowiki>
| + | |
| | | | |
| | ==Automatic restart== | | ==Automatic restart== |
| Line 59: |
Line 58: |
| | ==Wait Online== | | ==Wait Online== |
| | <nowiki>[Unit] | | <nowiki>[Unit] |
| − | Wants=network-online.target
| + | Wants=network-online.target |
| − | After=network.target network-online.target</nowiki>
| + | After=network.target network-online.target</nowiki> |
| | ===With NetworkManager=== | | ===With NetworkManager=== |
| | systemctl enable NetworkManager-wait-online | | systemctl enable NetworkManager-wait-online |
| Line 66: |
Line 65: |
| | ==ExecStart examples== | | ==ExecStart examples== |
| | | | |
| − | ====== Gunicorn ====== | + | ======Gunicorn====== |
| | ExecStart=/virtualenv/path/bin/gunicorn -w3 --timeout 300 --access-logfile /var/log/gunicorn/app-access.log --error-logfile /var/log/gunicorn/app-error.log --bind unix:/sockets/app-socket.sock App.wsgi | | ExecStart=/virtualenv/path/bin/gunicorn -w3 --timeout 300 --access-logfile /var/log/gunicorn/app-access.log --error-logfile /var/log/gunicorn/app-error.log --bind unix:/sockets/app-socket.sock App.wsgi |
| | | | |
| − | ==== Flask (superset) ==== | + | ====Flask (superset)==== |
| | <syntaxhighlight lang="text"> | | <syntaxhighlight lang="text"> |
| | ExecStart=/home/superset/.virtualenvs/superset/bin/gunicorn -w 3 -k gevent --timeout 120 -b unix:/home/superset/.superset/superset.sock --limit-request-line 0 --limit-request-field_size 0 --statsd-host localhost:8125 superset:app | | ExecStart=/home/superset/.virtualenvs/superset/bin/gunicorn -w 3 -k gevent --timeout 120 -b unix:/home/superset/.superset/superset.sock --limit-request-line 0 --limit-request-field_size 0 --statsd-host localhost:8125 superset:app |
| | </syntaxhighlight> | | </syntaxhighlight> |