Various improvements for systemd
This commit is contained in:
parent
a96ed753b2
commit
81278fa86b
|
@ -4,6 +4,7 @@ set -e
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
cp scripts/riju.service /etc/systemd/system/riju.service
|
cp scripts/riju.service /etc/systemd/system/riju.service
|
||||||
|
cp scripts/riju-serve.bash /usr/bin/riju-serve
|
||||||
cp scripts/certbot-pre.bash /etc/letsencrypt/renewal-hooks/pre/riju
|
cp scripts/certbot-pre.bash /etc/letsencrypt/renewal-hooks/pre/riju
|
||||||
cp scripts/certbot-post.bash /etc/letsencrypt/renewal-hooks/post/riju
|
cp scripts/certbot-post.bash /etc/letsencrypt/renewal-hooks/post/riju
|
||||||
cp scripts/deploy-phase1.py /usr/bin/riju-deploy
|
cp scripts/deploy-phase1.py /usr/bin/riju-deploy
|
||||||
|
|
|
@ -11,5 +11,5 @@ TLS_CERTIFICATE="$(base64 /etc/letsencrypt/live/riju.codes/fullchain.pem)"
|
||||||
# the script.
|
# the script.
|
||||||
export TLS TLS_PRIVATE_KEY TLS_CERTIFICATE
|
export TLS TLS_PRIVATE_KEY TLS_CERTIFICATE
|
||||||
|
|
||||||
docker run -e TLS -e TLS_PRIVATE_KEY -e TLS_CERTIFICATE \
|
docker run -it -e TLS -e TLS_PRIVATE_KEY -e TLS_CERTIFICATE \
|
||||||
--rm -p 0.0.0.0:80:6119 -p 0.0.0.0:443:6120 riju:prod
|
--rm -p 0.0.0.0:80:6119 -p 0.0.0.0:443:6120 riju:prod
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Riju online coding sandbox
|
Description=Riju online coding sandbox
|
||||||
|
Requires=docker.service
|
||||||
|
After=docker.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
Type=exec
|
||||||
ExecStart=riju-serve
|
ExecStart=riju-serve
|
||||||
|
Restart=always
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
Loading…
Reference in New Issue