Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@angelikatyborska
Created March 10, 2021 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angelikatyborska/b3eea95de37d59e80862989b438acc1f to your computer and use it in GitHub Desktop.
Save angelikatyborska/b3eea95de37d59e80862989b438acc1f to your computer and use it in GitHub Desktop.
Phoenix app serviced service file
# /etc/systemd/system/myphoenixapp.service
[Unit]
Description=Runner for My Phoenix App
After=network.target
StartLimitIntervalSec=500
StartLimitBurst=5
[Service]
WorkingDirectory=/path/to/myphoenixapp
ExecStart=/path/to/myphoenixapp/_build/prod/rel/myphoenixapp/bin/myphoenixapp start
ExecStop=/path/to/myphoenixapp/_build/prod/rel/myphoenixapp/bin/myphoenixapp stop
User=angelika
Restart=always
RestartSec=5s
Environment="PORT=4000"
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment