From d4ab9ff053b4fec8c03cde66871a3a6d1b176660 Mon Sep 17 00:00:00 2001 From: James Tombleson Date: Tue, 28 Nov 2023 16:33:17 -0800 Subject: [PATCH 1/2] adding files to generate docker image --- .dockerignore | 3 +++ .drone.yml | 23 +++++++++++++++++++++++ Dockerfile | 16 ++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 .dockerignore create mode 100644 .drone.yml create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..31c873c --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +.vscode +.github +.git \ No newline at end of file diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..e3f6400 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,23 @@ +--- +kind: pipeline +type: docker +name: buildLatestImage + +steps: + - name: buildLatestImage + image: plugins/docker + settings: + repo: jtom38/cookbook + username: jtom38 + password: + from_secret: DockerPushPat +trigger: + branch: + include: + - main + + event: + exclude: + - pull_request + + \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..77ff28f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM alpine:3.18 as build + +RUN apk add hugo +RUN apk add go +RUN apk add git +COPY . /app +WORKDIR /app +RUN hugo + +FROM alpine:3.18 +RUN apk add caddy +COPY --from=build /app/public /site +WORKDIR /site +EXPOSE 1313 + +ENTRYPOINT [ "caddy", "file-server", "--listen", ":1313" ] \ No newline at end of file From 99563d2078ac3e9412d1308c36bc45482ec0d733 Mon Sep 17 00:00:00 2001 From: James Tombleson Date: Tue, 28 Nov 2023 16:40:46 -0800 Subject: [PATCH 2/2] pushing to my personal server --- .drone.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index e3f6400..3aab88d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,10 +7,11 @@ steps: - name: buildLatestImage image: plugins/docker settings: - repo: jtom38/cookbook + registry: git.jamestombleson.com + repo: jtom38/Personal-Site username: jtom38 password: - from_secret: DockerPushPat + from_secret: GiteaContainerRegistry trigger: branch: include: