From d066ec9bcd69e0c1a6365aee5ce8f81621c24ea8 Mon Sep 17 00:00:00 2001 From: Late Night Defender Date: Thu, 23 Nov 2023 03:29:50 +0700 Subject: [PATCH] make the web deployable to ttt-org servers --- Dockerfile | 13 +++++++++++++ compute4change-news.container | 13 +++++++++++++ config.yml | 4 ---- install.sh | 8 ++++++++ 4 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 Dockerfile create mode 100644 compute4change-news.container create mode 100644 install.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3f00d72 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM docker.io/library/nginx:alpine + +RUN apk add hugo + +RUN mkdir /opt/compute4change-news + +COPY . /opt/compute4change-news + +WORKDIR /opt/compute4change-news + +RUN hugo + +RUN cp -r pubilc/* /usr/share/nginx/html \ No newline at end of file diff --git a/compute4change-news.container b/compute4change-news.container new file mode 100644 index 0000000..4394e5a --- /dev/null +++ b/compute4change-news.container @@ -0,0 +1,13 @@ +[Unit] +Description=TechTransThai.org Website + +[Container] +ContainerName=ttt-org +Image=ttt-org +PublishPort=8091:80 + +[Service] +Restart=always + +[Install] +WantedBy=multi-user.target default.target \ No newline at end of file diff --git a/config.yml b/config.yml index de9bda2..8c43a42 100644 --- a/config.yml +++ b/config.yml @@ -45,10 +45,6 @@ params: # disableHLJS: true # to disable highlight.js # disableFingerprinting: true favicon: "/favicon.ico" - favicon16x16: "" - favicon32x32: "" - apple_touch_icon: "" - safari_pinned_tab: "" # home-info mode homeInfoParams: diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..c6e19c6 --- /dev/null +++ b/install.sh @@ -0,0 +1,8 @@ +systemctl --user stop compute4change-news +cp compute4change-news.container ~/.config/containers/systemd +systemctl --user daemon-reload + +podman build -t compute4change-news . + + +systemctl --user start compute4change-news \ No newline at end of file