Beginning work on sticking website into container

saved all the relevent docs into a window, can't continue work now
because I need to rest before I go back to driving, need to setup a
conditional so I can do a docker build without having the comments
section enabled though maybe have the arg be the name nginx should hit
up for the comments instead of 0 v 1 for on v off
This commit is contained in:
Pagwin 2023-09-11 16:22:44 -04:00
parent 580557779d
commit 92186c3a58
No known key found for this signature in database
GPG key ID: F5FB283DD4B1A998
3 changed files with 24 additions and 1 deletions

12
Dockerfile Normal file
View file

@ -0,0 +1,12 @@
FROM alpine:3.18 as build
# making my own image for hugo because there doesn't seem to be an official one in repo, lazy so we're going with alpine
RUN ["apk", "update"]
RUN ["apk", "add hugo"]
ADD . /root/
WORKDIR /root
ARG WITH_COMMENTS=0
RUN ["hugo", "--minify"]
FROM nginx:1.25
RUN

View file

@ -21,9 +21,19 @@ Because I wanted to add comments. The way I'm planning on doing that will mean t
### Sounds like you've written a CMS so why is the static file hosting not a part of that?
Because I'm not writing a CMS, I'm just writing the backend for comments and sticking some htmx stuff into the hugo template for a blog for the frontend.
## [Writing the Go backend]
### Why Go?
### Annoyances
- Doesn't handle html multipart forms correctly(or the browser is wrong but I doubt that)
- Magic redirect when there's no trailing /
### Anyways
- yeeted oauth midway through
## [Writing the Hugo templating frontend]
## [Setting up the docker Containers]

View file

@ -9,6 +9,7 @@
<link rel="stylesheet" href="{{ .Site.BaseURL }}/libraries/normalize.3.0.1.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/liquorice.css" />
{{ cond (eq .Page.Kind "page") (safeHTML (printf "<link rel='stylesheet' href='%s/css/single.css'>" .Site.BaseURL)) "" }}
<script src="https://unpkg.com/htmx.org@1.9.5" integrity="sha384-xcuj3WpfgjlKF+FXhSQFQ0ZNr39ln+hwjN3npfM9VBnUskLolQAcN80McRIVOPuO" crossorigin="anonymous"></script>
<link rel="icon" href="{{ .Site.BaseURL }}/img/icon.png" />
<meta property="og:title" content="{{ .Title }}"/>
<meta property="og:type" content="website"/>