-
Notifications
You must be signed in to change notification settings - Fork 58
[Deployment] systemd Unit
Dimitris Zorbas edited this page Jul 4, 2019
·
2 revisions
When deploying your Kitto dashboards to a Linux systemd enabled machine you'll want to have a unit file to manage the Kitto application.
You can use the following as a sample to base yours:
[Unit]
Description=Kitto Server
[Service]
Type=simple
User=deployer
User=deployer
EnvironmentFile=/etc/default/kitto
ExecStart=/usr/bin/elixir --no-halt --no-compile --no-deps-check --name [email protected] -S mix kitto.server
WorkingDirectory=/var/www/apps/kitto
Restart=on-failure
[Install]
WantedBy=multi-user.target
Place your unit file at /etc/systemd/system/kitto.service
.
You should also place any env variables at /etc/default/kitto
Sample /etc/default/kitto
:
MIX_ENV=prod
NODE_ENV=production
Enable it:
systemctl daemon-reload
systemctl enable kitto.service
Start the service using:
systemctl start kitto
Stop the service using:
systemctl stop kitto
Restart the service using:
systemctl restart kitto
You may then tail log of the running Kitto server using:
journalctl -u kitto -f