Upgrade deployment system to use Quadlets

This commit is contained in:
Late Night Defender 2023-11-13 02:39:32 +07:00
parent 7527899133
commit 3ec21ca906
2 changed files with 18 additions and 6 deletions

View file

@ -1,11 +1,10 @@
podman stop ttt-org systemctl --user stop ttt-org
podman rm ttt-org podman rm ttt-org --force
sed -i "s/DATE/$(date -I)/g" index.html sed -i "s/DATE/$(date -I)/g" index.html
sed -i "s/VERSION/$(git log -1 --oneline | awk '{print $1}')/g" index.html sed -i "s/VERSION/$(git log -1 --oneline | awk '{print $1}')/g" index.html
podman build -t ttt-org . podman build -t ttt-org .
podman run --name ttt-org -p 8084:80 -d ttt-org cp ttt-org.container ~/.config/containers/systemd
podman generate systemd ttt-org > ~/.config/systemd/user/ttt-org.service
systemctl --user daemon-reload systemctl --user daemon-reload
systemctl --user enable ttt-org.service systemctl --user start ttt-org
podman run --name ttt-org -p 8084:80 -d ttt-org

13
ttt-org.container Normal file
View file

@ -0,0 +1,13 @@
[Unit]
Description=TechTransThai.org Website
[Container]
ContainerName=ttt-org
Image=ttt-org
PublishPort=8084:80
[Service]
Restart=always
[Install]
WantedBy=multi-user.target default.target