From a7a0998d393d08efcbe7916df296cf763cc90e62 Mon Sep 17 00:00:00 2001 From: James Tombleson Date: Sat, 14 Oct 2023 13:36:25 -0700 Subject: [PATCH] made improvements to have hugo be a docker image for self hosting --- .dockerignore | 3 ++ .drone.yml | 23 +++++++++++ Dockerfile | 16 ++++++++ README.md | 2 +- config.yaml | 2 +- .../recipes/2023/10/chicken-tacos/index.md | 40 +++++++++++++++++++ makefile | 8 +++- 7 files changed, 91 insertions(+), 3 deletions(-) create mode 100644 .dockerignore create mode 100644 .drone.yml create mode 100644 Dockerfile create mode 100644 content/recipes/2023/10/chicken-tacos/index.md 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 diff --git a/README.md b/README.md index 380685a..1d305c2 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,4 @@ This is my personal Cookbook hosted on Github built with Hugo. -The site can be viewed here [here](https://jtom38.github.io/cookbook) +This project has a docker file in it to build a small image that you can deploy where you want. This uses [caddy](https://caddyserver.com/) for the web server. The build process will take the project and generate the static files. These files are used to run the web server. If you want more information on that process check the Dockerfile. diff --git a/config.yaml b/config.yaml index 62d36e1..d4fda20 100644 --- a/config.yaml +++ b/config.yaml @@ -1,4 +1,4 @@ -baseURL: "https://cookbook.jamestombleson.com" +#baseURL: "https://cookbook.jamestombleson.com" languageCode: "en-us" title: "Tombleson Family Cookbook" theme: "github.com/jtom38/hugo-cookbook" diff --git a/content/recipes/2023/10/chicken-tacos/index.md b/content/recipes/2023/10/chicken-tacos/index.md new file mode 100644 index 0000000..6281aa0 --- /dev/null +++ b/content/recipes/2023/10/chicken-tacos/index.md @@ -0,0 +1,40 @@ +--- +title: "Southwestern Crockpot Chicken Tacos" +subtitle: +date: 2023-06-06T00:00:00-07:00 +draft: false + +tags: [Cake] +cuisine: [British] +course: [Desert] + +prepTimeMinutes: 30 +cookTimeMinutes: 50 +servings: "8 - 10" + +parenturl: https://www.savorynothings.com/southwestern-crockpot-chicken-tacos/ +--- + +## Ingredients + +- 1 pound chicken breast I used boneless, skinless +- 1 tablespoon taco seasoning or more to taste +- 1 (16-oz) jar salsa use half of your jar for less saucy chicken; see notes for more info +- 1 (15-oz) can black beans rinsed and drained +- 1 cup frozen corn +- 1 onion coarsely chopped +- taco shells and any toppings you like + +## Augmentation + +- Place the Chicken in the crocpot and add seasoning over chicken. +- Add onion and Salsa in the crockpot +- Cook for 8 hours. +- Cook the corn in a skillet to brown the corn. +- Cook the beans on their own + +## Sides + +- Instance Pot Mexican Rice +- Instance Pot Pinto Beans + diff --git a/makefile b/makefile index 64e0b2e..2b2b745 100644 --- a/makefile +++ b/makefile @@ -3,4 +3,10 @@ help: ## Shows this help command @egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' dev: ## builds the application with the current go runtime - hugo server -b localhost \ No newline at end of file + hugo server -b localhost + +docker-build: ## Builds the image + docker build -t cookbook . + +docker-run: ## Runs the compiled image for debugging + docker run -p 1313:1313 cookbook \ No newline at end of file