Commit 4b381462 authored by Ryan Herbert's avatar Ryan Herbert

Dockerfile nginx_web2py remove debian packages

instead of using the debian packages simply copy the vidjil source
code into the container. This way it is easier to automate a docker
image build.
See #2940
parent 5d2c0f4d
from ubuntu:16.04 from ubuntu:16.04
label version="1.0" label version="1.1"
label description="An Ubuntu based docker image which comes \ label description="An Ubuntu based docker image which comes \
with a full installation of the Vidjil algoright and browser/server." with a full installation of the Vidjil algoright and browser/server."
env GOSU_VERSION 1.7 env GOSU_VERSION 1.7
run set -x \ run set -x \
&& apt-get update && apt-get install -y --no-install-recommends ca-certificates wget cron && rm -rf /var/lib/apt/lists/* \ && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget cron unzip make python ipython python-enum34 python-requests && rm -rf /var/lib/apt/lists/* \
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
&& export GNUPGHOME="$(mktemp -d)" \ && export GNUPGHOME="$(mktemp -d)" \
...@@ -14,31 +14,12 @@ run set -x \ ...@@ -14,31 +14,12 @@ run set -x \
&& gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \
&& rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \
&& chmod +x /usr/local/bin/gosu \ && chmod +x /usr/local/bin/gosu \
&& apt-get purge -y --auto-remove ca-certificates wget && apt-get purge -y --auto-remove ca-certificates
run echo deb http://vda.vidjil.org:8080/archive sid/all/ >> /etc/apt/sources.list
run echo deb http://vda.vidjil.org:8080/archive sid/amd64/ >> /etc/apt/sources.list
run echo deb http://vda.vidjil.org:8080/archive wheezy/all/ >> /etc/apt/sources.list
run echo deb http://vda.vidjil.org:8080/archive wheezy/amd64/ >> /etc/apt/sources.list
run echo "vidjil-server vidjil/reconfigure-webserver string nginx" > preseed.txt
run echo "vidjil-server vidjil/restart-webserver boolean false" >> preseed.txt
run echo "vidjil-server vidjil/configure-startup string none" >> preseed.txt
run echo "vidjil-server vidjil/start-services boolean false" >> preseed.txt
run echo "vidjil-server vidjil/web2py-password string VidjilAdm1n" >> preseed.txt
run echo "vidjil-server vidjil/ssl-country string AU" >> preseed.txt
run echo "vidjil-server vidjil/ssl-state string Some-State" >> preseed.txt
run echo "vidjil-server vidjil/ssl-locality string Some-Locality" >> preseed.txt
run echo "vidjil-server vidjil/ssl-organisation string Internet Widgits Pty Ltd" >> preseed.txt
run echo "vidjil-server vidjil/ssl-section string Some-Section" >> preseed.txt
run echo "vidjil-server vidjil/ssl-name string VidjilTeam" >> preseed.txt
run echo "vidjil-server vidjil/ssl-email string team@vidjil.org" >> preseed.txt
run debconf-set-selections preseed.txt
run gpg --recv-keys --keyserver vda.vidjil.org 8EA70E25
run apt-get update ; apt-get install --no-install-recommends --no-install-suggests -y -q sudo curl apt-utils uwsgi-plugin-python nginx-full fcgiwrap run apt-get update ; apt-get install --no-install-recommends --no-install-suggests -y -q sudo curl apt-utils uwsgi-plugin-python nginx-full fcgiwrap
run apt-get update ; DEBIAN_FRONTEND=noninteractive apt-get -y -q --allow-unauthenticated install vidjil-archive-keyring
run apt-get update ; DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y -q --allow-unauthenticated vidjil-server copy ./source/ /usr/share/vidjil
run cd /usr/share/vidjil/server && wget --no-check-certificate https://mdipierro.pythonanywhere.com/examples/static/web2py_src.zip && unzip web2py_src.zip && unlink web2py_src.zip
run cd /usr/share/vidjil/germline && make run cd /usr/share/vidjil/germline && make
...@@ -52,11 +33,17 @@ copy ./conf/nginx_web2py /etc/nginx/sites-enabled/web2py ...@@ -52,11 +33,17 @@ copy ./conf/nginx_web2py /etc/nginx/sites-enabled/web2py
copy ./conf/nginx_web2py /etc/nginx/sites-available/web2py copy ./conf/nginx_web2py /etc/nginx/sites-available/web2py
copy ./conf/uwsgi.ini /etc/uwsgi/apps-enabled/web2py.ini copy ./conf/uwsgi.ini /etc/uwsgi/apps-enabled/web2py.ini
run mkdir /etc/vidjil
copy ./conf/defs.py /etc/vidjil/defs.py copy ./conf/defs.py /etc/vidjil/defs.py
copy ./conf/conf.js /etc/vidjil/conf.js copy ./conf/conf.js /etc/vidjil/conf.js
run ln -s /etc/vidjil/defs.py /usr/share/vidjil/server/web2py/applications/vidjil/modules/defs.py
run ln -s /etc/vidjil/conf.js /usr/share/vidjil/browser/js/conf.js
copy ./scripts/nginx-entrypoint.sh /entrypoints/nginx-entrypoint.sh copy ./scripts/nginx-entrypoint.sh /entrypoints/nginx-entrypoint.sh
copy ./scripts/uwsgi-entrypoint.sh /entrypoints/uwsgi-entrypoint.sh copy ./scripts/uwsgi-entrypoint.sh /entrypoints/uwsgi-entrypoint.sh
copy ./scripts/fuse-entrypoint.sh /entrypoints/fuse-entrypoint.sh copy ./scripts/fuse-entrypoint.sh /entrypoints/fuse-entrypoint.sh
run mkdir /usr/share/vidjil/server/web2py/applications/vidjil/databases && touch /usr/share/vidjil/server/web2py/applications/vidjil/databases/sql.log run mkdir /usr/share/vidjil/server/web2py/applications/vidjil/databases && touch /usr/share/vidjil/server/web2py/applications/vidjil/databases/sql.log
run mkdir /var/vidjil
run touch /var/vidjil/vidjil.log && touch /var/vidjil/vidjil-debug.log run touch /var/vidjil/vidjil.log && touch /var/vidjil/vidjil-debug.log
run adduser vidjil && usermod -aG sudo vidjil run adduser vidjil && usermod -aG sudo vidjil
run cd /usr/share/vidjil/server/web2py && python -c "from gluon.main import save_password; save_password('default',443)"
...@@ -36,7 +36,7 @@ server { ...@@ -36,7 +36,7 @@ server {
## from the previous server instance to manage static files ## from the previous server instance to manage static files
location /browser { location /browser {
root /var/www; root /usr/share/vidjil;
expires 1h; expires 1h;
add_header Cache-Control must-revalidate; add_header Cache-Control must-revalidate;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment