made improvements to have hugo be a docker image for self hosting #1

Merged
jtom38 merged 1 commits from features/docker-improvements into main 2023-10-14 13:37:10 -07:00
7 changed files with 91 additions and 3 deletions
Showing only changes of commit a7a0998d39 - Show all commits

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
.vscode
.github
.git

23
.drone.yml Normal file
View File

@ -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

16
Dockerfile Normal file
View File

@ -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" ]

View File

@ -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.

View File

@ -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"

View File

@ -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

View File

@ -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
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