Merge pull request 'Use docker-compose' (#28) from benjaoming/website:docker-compose into new
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #28
This commit is contained in:
commit
6eda9acc15
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -5,3 +5,6 @@
|
||||||
# Hugo stuff
|
# Hugo stuff
|
||||||
public
|
public
|
||||||
resources
|
resources
|
||||||
|
|
||||||
|
# from docker build
|
||||||
|
_site
|
||||||
|
|
6
Dockerfile_hugo
Normal file
6
Dockerfile_hugo
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
FROM debian:buster-slim
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get upgrade -y && \
|
||||||
|
apt-get install -y wget && \
|
||||||
|
wget https://github.com/gohugoio/hugo/releases/download/v0.80.0/hugo_extended_0.80.0_Linux-64bit.deb -O hugo.deb && \
|
||||||
|
dpkg -i hugo.deb
|
15
README.md
15
README.md
|
@ -5,8 +5,17 @@ data.coop-website
|
||||||
|
|
||||||
This is a [Hugo](https://gohugo.io/) project.
|
This is a [Hugo](https://gohugo.io/) project.
|
||||||
|
|
||||||
Running locally
|
Running with Docker
|
||||||
---------------
|
-------------------
|
||||||
|
|
||||||
|
In `docker-compose.yml`, we have specified a `serve` target which you can run locally like this:
|
||||||
|
|
||||||
|
``` {.sourceCode .bash}
|
||||||
|
docker-compose up serve
|
||||||
|
```
|
||||||
|
|
||||||
|
Running without Docker
|
||||||
|
----------------------
|
||||||
|
|
||||||
Go to [Hugo Github release](https://github.com/gohugoio/hugo/releases)
|
Go to [Hugo Github release](https://github.com/gohugoio/hugo/releases)
|
||||||
and fetch the latest package for **hugo\_extended** for your system.
|
and fetch the latest package for **hugo\_extended** for your system.
|
||||||
|
@ -18,7 +27,7 @@ Example recipe
|
||||||
|
|
||||||
``` {.sourceCode .bash}
|
``` {.sourceCode .bash}
|
||||||
# Fetch .deb from Github
|
# Fetch .deb from Github
|
||||||
wget https://github.com/gohugoio/hugo/releases/download/v0.80.0/hugo_extended_0.80.0_Linux-64bit.deb -O hugo_extended.deb
|
wget https://github.com/gohugoio/hugo/releases/download/v0.80.0/hugo_extended_X.Y.Z_Linux-64bit.deb -O hugo_extended.deb
|
||||||
|
|
||||||
# Install package
|
# Install package
|
||||||
sudo dpkg -i hugo_extended.deb
|
sudo dpkg -i hugo_extended.deb
|
||||||
|
|
18
docker-compose.yml
Normal file
18
docker-compose.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
version: "3"
|
||||||
|
services:
|
||||||
|
|
||||||
|
serve:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile_hugo
|
||||||
|
command: |
|
||||||
|
/bin/bash -c "
|
||||||
|
cd /code
|
||||||
|
hugo serve
|
||||||
|
"
|
||||||
|
ports:
|
||||||
|
- "1313:1313"
|
||||||
|
network_mode: "host"
|
||||||
|
volumes:
|
||||||
|
- .:/code
|
||||||
|
|
Loading…
Reference in a new issue