Browse Source

[blog] Tweaks for generating the content with git modification history

Romain 5 years ago
parent
commit
207ac19d81
2 changed files with 6 additions and 9 deletions
  1. 0 5
      .dockerignore
  2. 6 4
      tools/docker/website/Dockerfile

+ 0 - 5
.dockerignore

@@ -1,5 +0,0 @@
-build
-logs
-node_modules
-.git
-.vscode

+ 6 - 4
tools/docker/website/Dockerfile

@@ -4,23 +4,25 @@ LABEL description="gethue.com website"
 
 
 RUN apt-get update -y && apt-get install -y \
 RUN apt-get update -y && apt-get install -y \
   wget \
   wget \
-  python-pip
+  python-pip \
+  git
 
 
 RUN wget https://github.com/gohugoio/hugo/releases/download/v0.62.0/hugo_0.62.0_Linux-64bit.deb \
 RUN wget https://github.com/gohugoio/hugo/releases/download/v0.62.0/hugo_0.62.0_Linux-64bit.deb \
   && dpkg -i hugo*.deb \
   && dpkg -i hugo*.deb \
   && rm hugo*.deb \
   && rm hugo*.deb \
   && pip install Pygments
   && pip install Pygments
 
 
-ADD gethue /gethue
+ADD . /gethue
+#ADD docs/gethue /gethue
 WORKDIR /gethue
 WORKDIR /gethue
 
 
-RUN hugo --baseURL ""
+RUN hugo --source docs/gethue --baseURL ""
 
 
 
 
 
 
 FROM nginx:1.17-alpine
 FROM nginx:1.17-alpine
 ARG lang=en
 ARG lang=en
-COPY --from=build /gethue/public/${lang} /usr/share/nginx/html
+COPY --from=build /gethue/docs/gethue/public/${lang} /usr/share/nginx/html
 
 
 EXPOSE 80
 EXPOSE 80
 CMD ["nginx", "-g", "daemon off;"]
 CMD ["nginx", "-g", "daemon off;"]