Prepare agola build

This commit is contained in:
Peter 2022-09-08 22:55:59 +02:00
parent dcb4daa7eb
commit c391ab0781
Signed by: prskr
GPG key ID: C1DB5D2E8DB512F9
5 changed files with 66 additions and 3 deletions

38
.agola/config.yml Normal file
View file

@ -0,0 +1,38 @@
version: v0
runs:
- name: Build
tasks:
- name: checkout code
runtime:
type: pod
containers:
- image: docker.io/alpine/git
steps:
- clone:
- save_to_workspace:
contents:
- source_dir: .
dest_dir: .
paths:
- '**'
- name: build docker image
runtime:
containers:
- image: gcr.io/kaniko-project/executor:debug
shell: /busybox/sh
steps:
- restore_workspace:
dest_dir: .
- run:
name: generate docker config
command: |
cat << EOF > /kaniko/.docker/config.json
{
"auths": {
"code.icb4dc0.de": { "auth" : "$DOCKERAUTH" }
}
}
EOF
- run: /kaniko/executor --destination code.icb4dc0.de/prskr/blog:latest
depends:
- checkout code

8
.dockerignore Normal file
View file

@ -0,0 +1,8 @@
public/
.github/
.git/
Dockerfile
.dockerignore
.gitignore
.gitmodules

5
.gitignore vendored
View file

@ -14,3 +14,8 @@ hugo.linux
# IntelliJ project files
.idea/
*.o
cmake-build-debug
out/
CMakeLists.txt

12
Dockerfile Normal file
View file

@ -0,0 +1,12 @@
FROM docker.io/alpine:latest as builder
WORKDIR /src
COPY . ./
RUN apk add -U hugo && \
hugo --minify --environment production
FROM docker.io/caddy:2-alpine
COPY --from=builder /src/public /usr/share/caddy

View file

@ -1,6 +1,6 @@
baseURL = 'https://www.1533b4dc0.de/'
baseURL = 'https://www.icb4dc0.de/'
languageCode = 'en-us'
title = '1533B4dC0.de'
title = 'icb4dc0.de'
theme = "anubis"
paginate = 10
enableEmoji = true