-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
55 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
DB_USER=postgres | ||
DB_HOST=localhost | ||
DB_PORT=5432 | ||
DB_NAME=phinvads | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
[Unit] | ||
Description=PHIN VADS in Go | ||
|
||
# Wait until PostgreSQL is running and the network is "up" before starting the service. | ||
After=postgresql.service | ||
After=network-online.target | ||
Wants=network-online.target | ||
|
||
# Configure service start rate limiting. If the service is (re)started more than 5 times | ||
# in 600 seconds then don't permit it to start anymore. | ||
StartLimitIntervalSec=600 | ||
StartLimitBurst=5 | ||
|
||
[Service] | ||
# Execute the API binary as the azureuser user, loading the environment variables from | ||
# /etc/environment and using the working directory /home/azureuser. | ||
Type=exec | ||
User=azureuser | ||
Group=azureuser | ||
EnvironmentFile=/etc/environment | ||
WorkingDirectory=/home/azureuser | ||
ExecStart=/home/azureuser/phinvads-go | ||
|
||
# Automatically restart the service after a 5-second wait if it exits with a non-zero | ||
# exit code. If it restarts more than 5 times in 600 seconds, then the rate limit we | ||
# configured above will be hit and it won't be restarted anymore. | ||
Restart=on-failure | ||
RestartSec=5 | ||
|
||
[Install] | ||
# Start the service automatically at boot time (the 'multi-user.target' describes a boot | ||
# state when the system will accept logins). | ||
WantedBy=multi-user.target |