Add new html build
This commit is contained in:
parent
0caeafb3be
commit
c141ec1eb7
@ -19,6 +19,11 @@ after_script:
|
|||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
|
html:
|
||||||
|
extends: .builds
|
||||||
|
script:
|
||||||
|
- make html
|
||||||
|
|
||||||
proxy:
|
proxy:
|
||||||
extends: .builds
|
extends: .builds
|
||||||
script:
|
script:
|
||||||
|
24
Makefile
24
Makefile
@ -24,6 +24,26 @@ DOCKER_REGISTRY = registry.wojciechkozlowski.eu/wojtek/loki
|
|||||||
|
|
||||||
default: all
|
default: all
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# html
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
HTML = $(DOCKER_REGISTRY)/html
|
||||||
|
|
||||||
|
html-clean:
|
||||||
|
docker rmi $(HTML) || /bin/true
|
||||||
|
|
||||||
|
html-build:
|
||||||
|
docker build -f html/Dockerfile -t $(HTML) ./html
|
||||||
|
|
||||||
|
html-push:
|
||||||
|
docker push $(HTML)
|
||||||
|
|
||||||
|
html-pull:
|
||||||
|
docker pull $(HTML)
|
||||||
|
|
||||||
|
html: html-clean html-build html-push
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# proxy
|
# proxy
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
@ -93,21 +113,25 @@ clean-all:
|
|||||||
docker image prune -a -f
|
docker image prune -a -f
|
||||||
|
|
||||||
clean-builds: \
|
clean-builds: \
|
||||||
|
html-clean \
|
||||||
proxy-clean \
|
proxy-clean \
|
||||||
wiki-clean \
|
wiki-clean \
|
||||||
nextcloud-clean
|
nextcloud-clean
|
||||||
|
|
||||||
build-all: \
|
build-all: \
|
||||||
|
html-build \
|
||||||
proxy-build \
|
proxy-build \
|
||||||
wiki-build \
|
wiki-build \
|
||||||
nextcloud-build
|
nextcloud-build
|
||||||
|
|
||||||
push-all: \
|
push-all: \
|
||||||
|
html-push \
|
||||||
proxy-push \
|
proxy-push \
|
||||||
wiki-push \
|
wiki-push \
|
||||||
nextcloud-push
|
nextcloud-push
|
||||||
|
|
||||||
pull-all: \
|
pull-all: \
|
||||||
|
html-pull \
|
||||||
proxy-pull \
|
proxy-pull \
|
||||||
wiki-pull \
|
wiki-pull \
|
||||||
nextcloud-pull
|
nextcloud-pull
|
||||||
|
@ -19,7 +19,8 @@ services:
|
|||||||
|
|
||||||
html:
|
html:
|
||||||
container_name: html
|
container_name: html
|
||||||
image: registry.wojciechkozlowski.eu/wojtek/wojciechkozlowski.eu/image
|
build: html
|
||||||
|
image: registry.wojciechkozlowski.eu/wojtek/loki/html
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
24
html/Dockerfile
Normal file
24
html/Dockerfile
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
FROM nginx
|
||||||
|
|
||||||
|
# Update
|
||||||
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
RUN apt-get update && apt-get -y upgrade
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
# Install pre-requisites
|
||||||
|
apt-get -y install wget git && \
|
||||||
|
wget https://github.com/gohugoio/hugo/releases/download/v0.56.0/hugo_extended_0.56.0_Linux-64bit.deb && \
|
||||||
|
dpkg -i hugo_extended_0.56.0_Linux-64bit.deb && \
|
||||||
|
rm hugo_extended_0.56.0_Linux-64bit.deb && \
|
||||||
|
|
||||||
|
# Fetch the website code, build and deploy
|
||||||
|
git clone --recursive https://gitlab.wojciechkozlowski.eu/wojtek/wojciechkozlowski.eu.git && \
|
||||||
|
cd wojciechkozlowski.eu && \
|
||||||
|
hugo && \
|
||||||
|
cp -r public/* /usr/share/nginx/html && \
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
cd .. && \
|
||||||
|
rm -rf wojciechkozlowski.eu && \
|
||||||
|
apt-get -y purge hugo git wget && \
|
||||||
|
apt-get -y autoremove
|
Reference in New Issue
Block a user