Skip to content

Instantly share code, notes, and snippets.

@Pinwheeler
Last active November 29, 2020 01:56
Show Gist options
  • Save Pinwheeler/4610a50b5d3bf58ae4d1b4257b999044 to your computer and use it in GitHub Desktop.
Save Pinwheeler/4610a50b5d3bf58ae4d1b4257b999044 to your computer and use it in GitHub Desktop.
[Unit]
Description=My Java Application
After=syslog.target
[Service]
Environment="MY_DATABASE_PASSWORD=<database_password>"
User=<droplet_username>
ExecStart=/usr/bin/java -Xmx256m -Dspring.profiles.active=<profile> -jar /home/<droplet_username>/myapp.jar
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