Add deployent stuff

This commit is contained in:
Late Night Defender 2024-06-16 16:43:04 +07:00
parent b123fc62b5
commit 1ace5d37e8
4 changed files with 37 additions and 1 deletions

13
BlaCHp.container Normal file
View file

@ -0,0 +1,13 @@
[Unit]
Description=BlaCHp Website
[Container]
ContainerName=BlaCHp
Image=localhost/blachp
PublishPort=8087:80
[Service]
Restart=always
[Install]
WantedBy=multi-user.target default.target

15
Dockerfile Normal file
View file

@ -0,0 +1,15 @@
FROM docker.io/library/nginx:alpine
RUN apk add git go
RUN apk add --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community --no-cache hugo
RUN mkdir -p /opt/blachp.techtransthai.org
COPY . /opt/blachp.techtransthai.org
WORKDIR /opt/blachp.techtransthai.org
RUN hugo
RUN cp -r public/* /usr/share/nginx/html

2
go.mod
View file

@ -1,5 +1,5 @@
module forge.techtransthai.org/latenightdef/blachp.techtransthai.org
go 1.22.4
go 1.21.10
require github.com/jpanther/lynx v1.4.0 // indirect

8
install.sh Normal file
View file

@ -0,0 +1,8 @@
systemctl --user stop BlaCHp
cp BlaCHp.container ~/.config/containers/systemd
systemctl --user daemon-reload
podman build -t blachp .
systemctl --user start BlaCHp