Hugo
This commit is contained in:
1 parent
ddf6b5a54c
commit
2f767a1826
5 files changed
+91
No files matched your search
@@ -0,0 +1,23 @@
|
||||
FROM alpine:latest
|
||||
|
||||
# Install dependencies
|
||||
RUN apk add --no-cache git curl tar
|
||||
|
||||
# Download and install Hugo
|
||||
RUN HUGO_VERSION=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep 'tag_name' | cut -d\" -f4) && \
|
||||
curl -L https://github.com/gohugoio/hugo/releases/download/${HUGO_VERSION}/hugo_extended_${HUGO_VERSION#v}_Linux-64bit.tar.gz | tar -xz && \
|
||||
mv hugo /usr/local/bin/
|
||||
|
||||
# Create a new Hugo site
|
||||
RUN hugo new site mysite
|
||||
|
||||
# Add Decap CMS
|
||||
WORKDIR /mysite/static/admin
|
||||
RUN git clone https://github.com/decapcms/decap.git .
|
||||
|
||||
# Expose volume for Hugo site
|
||||
VOLUME /mysite
|
||||
|
||||
# Serve the site
|
||||
EXPOSE 1313
|
||||
CMD ["hugo", "server", "--bind=0.0.0.0"]
|
||||
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
ssh -p 2222 -o StrictHostKeyChecking=no git@127.0.0.1 "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@"
|
||||
@@ -0,0 +1,19 @@
|
||||
server {
|
||||
|
||||
listen 80;
|
||||
server_name {{ http_host }};
|
||||
|
||||
# location /_/static {
|
||||
|
||||
# alias /path/to/gitea/public;
|
||||
# }
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:3000;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user