planet.plone.org/svx: WIP moar docker stuff

sven <jenkins-z4DKO/[email protected]> Sun, 30 Jul 2017 10:12:46 -0700 (PDT)
Newsgroups gmane.comp.web.zope.plone.cvs
Message-ID <[email protected]>
Repository: planet.plone.org
Branch: refs/heads/svx
Date: 2017-07-30T19:12:35+02:00
Author: sven (svx) <[email protected]>
Commit: https://github.com/plone/planet.plone.org/commit/37e63c83d3fde7b8390114b1dcfb88a6fabe208b

WIP moar docker stuff

Files changed:
M dockerfiles/Caddyfile
M dockerfiles/Dockerfile
M dockerfiles/Procfile
M dockerfiles/crontab.tmp

diff --git a/dockerfiles/Caddyfile b/dockerfiles/Caddyfile
index 9e7ea8e..0637965 100644
--- a/dockerfiles/Caddyfile
+++ b/dockerfiles/Caddyfile
@@ -1,13 +1,8 @@
-planet.plone.org:80 {
-    0.0.0.0
+http://planet.plone.org {
     log stdout
     errors stdout
     gzip
     tls no
+    root /srv/venus/public_html
 }
 
-header / {
-    Cache-Control "max-age=86400"
-}
-
-root /srv/venus/public_html
diff --git a/dockerfiles/Dockerfile b/dockerfiles/Dockerfile
index 557d145..baaa4d6 100644
--- a/dockerfiles/Dockerfile
+++ b/dockerfiles/Dockerfile
@@ -17,6 +17,7 @@ RUN builddeps=' \
 	libxslt \
         bash \
         py-pip \
+        vim \
     && mkdir -p /srv/venus \
     && adduser -g "Planet User" -D -s /bin/bash -h /srv/venus planet \
     && git clone https://github.com/rubys/venus.git /srv/venus/source \
@@ -28,6 +29,7 @@ RUN builddeps=' \
 
 COPY dockerfiles/Caddyfile /etc/Caddyfile
 COPY dockerfiles/crontab.tmp /etc/cron.d/planet.cron
+COPY dockerfiles/Procfile /srv/Procfile
 RUN crontab /etc/cron.d/planet.cron
 
 WORKDIR /srv/venus
@@ -35,7 +37,7 @@ WORKDIR /srv/venus
 COPY planet planet.plone.org
 RUN chown -R planet:planet planet.plone.org
 
-USER planet
+#USER planet
 ENTRYPOINT ["/bin/bash"]
 
 # Todo:
diff --git a/dockerfiles/Procfile b/dockerfiles/Procfile
index e7fc5ff..13d7b57 100644
--- a/dockerfiles/Procfile
+++ b/dockerfiles/Procfile
@@ -1,2 +1,2 @@
-crond: tini /usr/sbin/crond -f -L -
-caddy: tini /usr/bin/caddy
+crond: /sbin/tini -s /usr/sbin/crond -f
+webserver: /sbin/tini -s /usr/bin/caddy -conf /etc/Caddyfile
diff --git a/dockerfiles/crontab.tmp b/dockerfiles/crontab.tmp
index f690e68..d9cfbe2 100644
--- a/dockerfiles/crontab.tmp
+++ b/dockerfiles/crontab.tmp
@@ -1,3 +1,3 @@
 # This is a cron to update planet.plone every hour
-SHELL=/bin/bash
-0 * * * * planet python /srv/venus/source/planet.py /srv/planet.plone.org/planet.ini >> /var/log/cron.log 2>&1
+#0 * * * * planet python /srv/venus/source/planet.py /srv/planet.plone.org/planet.ini
+*/5 * * * * python2.7 /srv/venus/source/planet.py /srv/venus/planet.plone.org/planet.ini



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot