From 8b1ee20ba618dc3bc7b1cd80f7b49870711c33d1 Mon Sep 17 00:00:00 2001 From: Sam Al-Sapti Date: Sun, 30 Jul 2023 00:26:13 +0200 Subject: [PATCH] Use klakegg/hugo for building site --- .drone.yml | 16 ++++++---------- Dockerfile_hugo | 7 ------- docker-compose.yml | 14 ++++++-------- 3 files changed, 12 insertions(+), 25 deletions(-) delete mode 100644 Dockerfile_hugo diff --git a/.drone.yml b/.drone.yml index bc7a60f..aac4cfd 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,24 +3,20 @@ name: default steps: - name: build_stable - image: debian:buster-slim + image: klakegg/hugo:ext-alpine-ci + environment: + HUGO_SECURITY_HTTP_URLS: none commands: - - apt-get update; apt-get upgrade -y - - apt-get install -y wget git - - wget https://github.com/gohugoio/hugo/releases/download/v0.111.2/hugo_extended_0.111.2_linux-amd64.deb -O hugo.deb - - dpkg -i hugo.deb - hugo --destination _site/ when: branch: - main - name: build_staging - image: debian:buster-slim + image: klakegg/hugo:ext-alpine-ci + environment: + HUGO_SECURITY_HTTP_URLS: none commands: - - apt-get update; apt-get upgrade -y - - apt-get install -y wget git - - wget https://github.com/gohugoio/hugo/releases/download/v0.111.2/hugo_extended_0.111.2_linux-amd64.deb -O hugo.deb - - dpkg -i hugo.deb - hugo --baseURL "https://staging.data.coop" --destination _site/ when: branch: diff --git a/Dockerfile_hugo b/Dockerfile_hugo deleted file mode 100644 index 98716cf..0000000 --- a/Dockerfile_hugo +++ /dev/null @@ -1,7 +0,0 @@ -FROM debian:buster-slim - -RUN apt-get update && \ - apt-get upgrade -y && \ - apt-get install -y wget git && \ - wget https://github.com/gohugoio/hugo/releases/download/v0.111.1/hugo_extended_0.111.1_linux-amd64.deb -O hugo.deb && \ - dpkg -i hugo.deb diff --git a/docker-compose.yml b/docker-compose.yml index 177da9d..77b6030 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,12 +1,10 @@ version: "3" services: - serve: - build: - context: . - dockerfile: Dockerfile_hugo - command: | - /bin/bash -c "cd /code && hugo serve" - network_mode: host + server: + image: klakegg/hugo:ext-alpine + command: server volumes: - - .:/code + - ".:/src" + ports: + - "1313:1313"