„Dockerfile“ ändern

This commit is contained in:
Stefan Hoffmann 2019-12-02 18:57:40 +00:00
parent 658aeb87cb
commit 4ec864f78c

View File

@ -3,10 +3,10 @@ MAINTAINER Freifunk Rhein-Sieg e.V. <technik@freifunk-rhein-sieg.net>
EXPOSE 80 EXPOSE 80
WORKDIR /project WORKDIR /project
COPY _includes /usr/share/nginx/html/_includes RUN apt-get update -y && apt-get install -y git ruby ruby-dev rubygems build-essential cron
COPY _layouts /usr/share/nginx/html/_layouts RUN gem install bundle
COPY _posts /usr/share/nginx/html/_posts RUN git init && git remote add origin https://git.freifunk-rhein-sieg.net/Freifunk-Rhein-Sieg/freifunk-rhein-sieg.net
COPY _scss /usr/share/nginx/html/_scss RUN touch /etc/cron.d/update && touch /srv/update.sh && chmod 775 /srv/update.sh && chmod 644 /etc/cron.d/update && touch /var/log/cron.log
COPY assets /usr/share/nginx/html/assets RUN echo "cd /project && git pull origin master && /usr/local/bin/jekyll build && rm -rf /usr/share/nginx/html/* && cp -r _site/* /usr/share/nginx/html" > /srv/update.sh
COPY * /usr/share/nginx/html/ RUN echo "*/30 * * * * root /srv/update.sh >> /var/log/cron.log 2>&1" > /etc/cron.d/update
ENTRYPOINT nginx -g "daemon off;" ENTRYPOINT git fetch && git pull origin master && bundle install && bundle exec jekyll build && rm -rf /usr/share/nginx/html/* && cp -r _site/* /usr/share/nginx/html && echo "ready" && /etc/init.d/cron start && nginx -g "daemon off;"