aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2019-09-05 15:11:05 +0200
committerGerd Hoffmann <kraxel@redhat.com>2019-09-05 15:11:05 +0200
commit681bdc67234da6f69ab7feb30e1b3372da96608e (patch)
tree0d674bebfbcbb781eacd0f1fdccb646b0758ff6d
parent50f7450f498243a91361b68263938121b434cd49 (diff)
downloads2i-jekyll-681bdc67234da6f69ab7feb30e1b3372da96608e.tar.gz
update assemble + run
-rw-r--r--Dockerfile2
-rwxr-xr-xs2i/bin/assemble8
-rwxr-xr-xs2i/bin/run2
3 files changed, 10 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
index 23e9a94..9831fc0 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -30,6 +30,8 @@ COPY ./s2i/bin/ /usr/libexec/s2i
# TODO: Drop the root user and make the content of /opt/app-root owned by user 1001
# RUN chown -R 1001:1001 /opt/app-root
+RUN chown -R 1001:1001 /var/www/html
+RUN echo "Listen 8080" > /etc/httpd/conf.d/port-8080.conf
USER 1001
EXPOSE 8080
diff --git a/s2i/bin/assemble b/s2i/bin/assemble
index 918395e..b82b59b 100755
--- a/s2i/bin/assemble
+++ b/s2i/bin/assemble
@@ -23,4 +23,10 @@ echo "---> Installing application source..."
cp -Rf /tmp/src/. ./
echo "---> Building application from source..."
-# TODO: Add build steps for your application, eg npm install, bundle install, pip install, etc.
+if test -f Gemfile; then
+ bundle exec jekyll build
+else
+ jekyll build
+fi
+cd _site
+cp -a . /var/www/html
diff --git a/s2i/bin/run b/s2i/bin/run
index f726e00..9d031e9 100755
--- a/s2i/bin/run
+++ b/s2i/bin/run
@@ -7,4 +7,4 @@
# https://github.com/openshift/source-to-image/blob/master/docs/builder_image.md
#
-exec asdf -p 8080
+exec /usr/sbin/httpd