diff --git a/BlaCHp.container b/BlaCHp.container new file mode 100644 index 0000000..2f4913f --- /dev/null +++ b/BlaCHp.container @@ -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 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..36c88e6 --- /dev/null +++ b/Dockerfile @@ -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 \ No newline at end of file diff --git a/go.mod b/go.mod index d5a3745..f84073a 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..2345644 --- /dev/null +++ b/install.sh @@ -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