Skip to content

Instantly share code, notes, and snippets.

@davidkeen

davidkeen/env

Last active Oct 17, 2018
Embed
What would you like to do?
A systemd unit file for Play Framework
ADDRESS=127.0.0.1
PORT=9000
APPLY_EVOLUTIONS=true
APPLICATION_SECRET=my_secret
[Unit]
Description=My play app
After=network.target
[Service]
EnvironmentFile=/path/to/app/conf/env
PIDFile=/path/to/app/RUNNING_PID
WorkingDirectory=/path/to/app
ExecStart=/path/to/app/bin/play -Dhttp.address=${ADDRESS} -Dhttp.port=${PORT} -Dplay.evolutions.db.default.autoApply=${APPLY_EVOLUTIONS} -J-server
Restart=on-failure
User=play_user
Group=play_user
# See http://serverfault.com/a/695863
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.