Skip to content

Instantly share code, notes, and snippets.

@edevil
Forked from kzkin/phoenix-app.service
Created February 12, 2016 12:49
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save edevil/5e145d3e3aeb342091db to your computer and use it in GitHub Desktop.
Save edevil/5e145d3e3aeb342091db to your computer and use it in GitHub Desktop.
systemd service for phoenix framework release (exrm)
# Phoenix Framework - A productive web framework that does not compromise speed and maintainability
[Unit]
Description=Phoenix Framework ISControl Application
After=network.target
[Service]
Type=simple
User=deployer
RemainAfterExit=yes
# Environment=MIX_ENV=prod PORT=4000
WorkingDirectory=/srv/apps/iscontrol/
ExecStart=/srv/apps/iscontrol/bin/iscontrol start
ExecStop=/srv/apps/iscontrol/bin/iscontrol stop
Restart=on-failure
TimeoutSec=300
[Install]
WantedBy=multi-user.target
@philipgiuliani
Copy link

Its somehow possible to load the ~/.profile file? I have all env variables defined there!

@minhajuddin
Copy link

@philipgiuliani You can check line#13 of my fork https://gist.github.com/minhajuddin/bd78e59b16b5f1ba68dad7ac82d49619 You can source the "env" file which can contain your export PORT=4000 and other env vars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment