mfashby.net

Website mfashby.net
git clone git://code.mfashby.net:/mfashby.net
Log | Files | Refs | Submodules | README

commit b51a506e908ca0ab6c1409eab8b6af9d8c288ff1
parent 511576c016f39fc48d83266fe20c418c9ee10ec2
Author: Martin Ashby <martin@ashbysoft.com>
Date:   Sat, 31 Dec 2022 16:37:37 +0000

Use EnvironmentFile to keep server-only values on the server,
but still keep the systemd unit file in git and deploy it usually

Diffstat:
Mcomments/comments.service | 2+-
Mdeploy.sh | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/comments/comments.service b/comments/comments.service @@ -6,7 +6,7 @@ After=postgres.service User=comments ExecStart=/usr/local/bin/comments Restart=on-failure -Environment="DATABASE_URL=postgres:///comments" +EnvironmentFile=/etc/sysconfig/comments [Install] WantedBy=multi-user.target diff --git a/deploy.sh b/deploy.sh @@ -22,7 +22,7 @@ rsync -rz public/* root@rpi3:/var/www/mfashby.net # Copy comments app and reboot ssh root@rpi3 -C systemctl stop comments rsync comments/target/aarch64-unknown-linux-gnu/release/comments root@rpi3:/usr/local/bin/comments -#rsync comments/comments.service root@rpi3:/etc/systemd/system/comments.service +rsync comments/comments.service root@rpi3:/etc/systemd/system/comments.service ssh root@rpi3 -C systemctl daemon-reload ssh root@rpi3 -C systemctl restart comments