You are viewing a plain text version of this content. The canonical link for it is here.
Posted to privacy-commits@apache.org by gr...@apache.org on 2021/03/06 14:43:06 UTC

[privacy-website] branch main updated: added instructions for building and working with this website using Docker

This is an automated email from the ASF dual-hosted git repository.

grobmeier pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/privacy-website.git


The following commit(s) were added to refs/heads/main by this push:
     new 5075624  added instructions for building and working with this website using Docker
5075624 is described below

commit 507562458aeb11f370a6862d099b7d5418e494d7
Author: Christian Grobmeier <cg...@grobmeier.de>
AuthorDate: Sat Mar 6 15:42:58 2021 +0100

    added instructions for building and working with this website using Docker
---
 Dockerfile | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 README.md  | 42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 98 insertions(+)

diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..abeef52
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,56 @@
+FROM ruby:2.7.1-alpine3.11 as dependencies
+
+RUN apk --no-cache add \
+  zlib-dev \
+  libffi-dev \
+  build-base \
+  libxml2-dev \
+  imagemagick-dev \
+  readline-dev \
+  libxslt-dev \
+  libffi-dev \
+  yaml-dev \
+  zlib-dev \
+  vips-dev \
+  sqlite-dev \
+  cmake
+
+RUN apk --no-cache add \
+  linux-headers \
+  openjdk8-jre \
+  less \
+  zlib \
+  libxml2 \
+  readline \
+  libxslt \
+  libffi \
+  git \
+  nodejs \
+  tzdata \
+  shadow \
+  bash \
+  su-exec \
+  nodejs-npm \
+  libressl \
+  yarn
+
+WORKDIR /root/build
+
+RUN gem install bundler:1.17.3
+ENV BUNDLE_CLEAN=false
+
+COPY Gemfile .
+COPY Gemfile.lock .
+
+RUN bundle config clean
+RUN bundle install
+
+EXPOSE 4000
+EXPOSE 35729
+
+# COPY . .
+
+# RUN gulp build 
+
+# $0 = Commando, $@ Arggumentte!
+ENTRYPOINT ["sh", "-c", "bundle exec jekyll $0 $@ --host 0.0.0.0"]
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..021b8d2
--- /dev/null
+++ b/README.md
@@ -0,0 +1,42 @@
+# The Apache Software Foundation - Privacy Website
+
+This is the source code for the website at privacy.apache.org.
+
+## Develop this website
+
+To develop content for this website, you need to make sure you have
+Docker installed. Once installed, you can run this command
+to create a docker image:
+
+```
+$> cd <your project folder>
+$> docker build -t apache/privacy_apache_org .
+```
+
+Whenever you change something in the Dockers dependencies, you have to recreate
+the docker image.
+
+Afterwards you are able to run the website.
+
+To run the website in serve mode (running a server to quickly check your code)
+you'll have to run this command:
+
+```
+docker run --rm -p 4000:4000 -p 35729:35729 --mount type=bind,src=$PWD,dst=/root/build --mount type=volume,dst=/root/build/node_modules -it apache/privacy_apache_org serve --watch --incremental
+```
+
+Once it runs, you can reach your website at:
+
+```
+http://localhost:4000/
+```
+
+Jekyll will regenerate content as you change it and you can see all changes with 
+hitting refresh.
+
+If you find it necessary to connect to your Docker instance while working, you can run
+and connect to it with this command:
+
+```
+docker run --rm -p 4000:4000 -p 35729:35729 --mount type=bind,src=$PWD,dst=/root/build --mount type=volume,dst=/root/build/node_modules -it  --entrypoint "/bin/bash" apache/privacy_apache_org
+```


---------------------------------------------------------------------
To unsubscribe, e-mail: privacy-commits-unsubscribe@apache.org
For additional commands, e-mail: privacy-commits-help@apache.org