Add files for self hosting

This commit is contained in:
Late Night Defender 2024-02-23 02:42:35 +07:00
parent 3e64c4c381
commit 5a33a96413
3 changed files with 27 additions and 0 deletions

4
Dockerfile Normal file
View file

@ -0,0 +1,4 @@
FROM docker.io/library/nginx:alpine
# Copy files to nginx path
COPY . /usr/share/nginx/html

10
install.sh Executable file
View file

@ -0,0 +1,10 @@
systemctl --user stop latenightdef
cp latenightdef.container ~/.config/containers/systemd
systemctl --user daemon-reload
sed -i "s/DATE/$(date -I)/g" index.html
sed -i "s/VERSION/$(git log -1 --oneline | awk '{print $1}')/g" index.html
podman build -t latenightdef .
systemctl --user start latenightdef

13
latenightdef.container Normal file
View file

@ -0,0 +1,13 @@
[Unit]
Description=Late Night Defender personal website
[Container]
ContainerName=latenightdef
Image=latenightdef
PublishPort=8083:80
[Service]
Restart=always
[Install]
WantedBy=multi-user.target default.target