diff options
author | makefu <root@pigstarter.de> | 2014-01-20 22:43:40 +0100 |
---|---|---|
committer | makefu <root@pigstarter.de> | 2014-01-20 22:43:40 +0100 |
commit | b0cedd7f9745902e462a91aac7a34de8f3798c27 (patch) | |
tree | d5695fe749e6d8ccb8b245c1758cc4fbb619aaca /sites/mediengewitter.krebsco.de | |
parent | 7baee36853d0fae399a951918c2b8ebe4e6da6a8 (diff) | |
parent | c04f99d787e56c7eb5db611bcbcef8269e1b3903 (diff) |
Merge branch 'master' of https://github.com/krebscode/painload
Diffstat (limited to 'sites/mediengewitter.krebsco.de')
8 files changed, 76 insertions, 0 deletions
diff --git a/sites/mediengewitter.krebsco.de/README.md b/sites/mediengewitter.krebsco.de/README.md new file mode 100644 index 00000000..e7bd88a2 --- /dev/null +++ b/sites/mediengewitter.krebsco.de/README.md @@ -0,0 +1,11 @@ +# Mediengewitter +Broadcast funny pictures. + +Mediengewitter is divided into two parts: +1. the image crawler (magnets) +2. the website (mediengewitter) + +Mediengewitter is deployed via docker containerization. + +# magnets + diff --git a/sites/mediengewitter.krebsco.de/magnets/DEPLOY.md b/sites/mediengewitter.krebsco.de/magnets/DEPLOY.md new file mode 100644 index 00000000..f422f79f --- /dev/null +++ b/sites/mediengewitter.krebsco.de/magnets/DEPLOY.md @@ -0,0 +1,7 @@ +# docker + +/media/ext/magnet_pics is the path to a lot of disk space which will be shared by magnets and mediengewitter. + + docker build -t krebs/magnets . + # autostart this somehow + docker run -v /media/ext/magnet_pics/:/images krebs/magnets diff --git a/sites/mediengewitter.krebsco.de/magnets/Dockerfile b/sites/mediengewitter.krebsco.de/magnets/Dockerfile new file mode 100644 index 00000000..8bf400d5 --- /dev/null +++ b/sites/mediengewitter.krebsco.de/magnets/Dockerfile @@ -0,0 +1,17 @@ +FROM ubuntu:latest +RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list +RUN dpkg-divert --local --rename --add /sbin/initctl +RUN ln -s /bin/true /sbin/initctl +RUN apt-get update +RUN apt-get install -y python-software-properties python g++ make +RUN add-apt-repository -y ppa:chris-lea/node.js +RUN apt-get update +RUN apt-get -y install nodejs +RUN mkdir -p /opt/magnets +Add magnets/ /magnets +RUN cd /magnets && npm install +# fix crappy wwwdude +RUN cp /magnets/node_modules/wwwdude/lib/wwwdude/node-versions/v0.5.x.js /magnets/node_modules/wwwdude/lib/wwwdude/node-versions/v0.10..js +# -v /media/ext/magnet_pics/:/images +ENV image_folder /images +CMD ["/magnets/run.sh"] diff --git a/sites/mediengewitter.krebsco.de/magnets/magnets b/sites/mediengewitter.krebsco.de/magnets/magnets new file mode 160000 +Subproject 7f8925b2779706c381416f4d578385f520ad462 diff --git a/sites/mediengewitter.krebsco.de/mediengewitter/DEPLOY.md b/sites/mediengewitter.krebsco.de/mediengewitter/DEPLOY.md new file mode 100644 index 00000000..7cf8826a --- /dev/null +++ b/sites/mediengewitter.krebsco.de/mediengewitter/DEPLOY.md @@ -0,0 +1,9 @@ +# docker + + docker build -t krebs/mediengewitter . + # autostart this somehow + docker run -p 127.0.0.1::8080 -v /media/ext/magnet_pics/:/images krebs/mediengewitter + +# nginx + + cp etc/nginx/sites-available/mediengewitter.krebsco.de.conf /etc/nginx/sites-available/ diff --git a/sites/mediengewitter.krebsco.de/mediengewitter/Dockerfile b/sites/mediengewitter.krebsco.de/mediengewitter/Dockerfile new file mode 100644 index 00000000..dbfb2a8b --- /dev/null +++ b/sites/mediengewitter.krebsco.de/mediengewitter/Dockerfile @@ -0,0 +1,17 @@ +FROM ubuntu:latest +RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list +RUN dpkg-divert --local --rename --add /sbin/initctl +RUN ln -s /bin/true /sbin/initctl +RUN apt-get update +RUN apt-get install -y python-software-properties python g++ make +RUN add-apt-repository -y ppa:chris-lea/node.js +RUN apt-get update +RUN apt-get -y install nodejs +Add mediengewitter/ /mediengewitter +RUN cd /mediengewitter && npm install +# -v /media/ext/magnet_pics/:/images +EXPOSE 8080 +ENV PORT 8080 +RUN rm /mediengewitter/public/content -r +RUN ln -s /images /mediengewitter/public/content +CMD ["/mediengewitter/run.sh"] diff --git a/sites/mediengewitter.krebsco.de/mediengewitter/etc/nginx/sites-available/mediengewitter.krebsco.de.conf b/sites/mediengewitter.krebsco.de/mediengewitter/etc/nginx/sites-available/mediengewitter.krebsco.de.conf new file mode 100644 index 00000000..90ab803c --- /dev/null +++ b/sites/mediengewitter.krebsco.de/mediengewitter/etc/nginx/sites-available/mediengewitter.krebsco.de.conf @@ -0,0 +1,15 @@ +server { + listen 80; + server_name mediengewitter.krebsco.de; +# access_log /var/log/nginx/log/mediengewitter.log; +# error_log /var/log/nginx/log/mediengewitter_error.log; + default_type text/plain; + location / { + proxy_pass http://127.0.0.1:8080/; + proxy_redirect off; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } +} + diff --git a/sites/mediengewitter.krebsco.de/mediengewitter/mediengewitter b/sites/mediengewitter.krebsco.de/mediengewitter/mediengewitter new file mode 160000 +Subproject db557ff99e9e420b8f85241514c211f20e3ca96 |