<|start_filename|>pythoncontainer/Dockerfile<|end_filename|>
# Docker Container with
# Basic Python Install
# 
# Dr. <NAME>
# The Python Quants GmbH

FROM ubuntu:trusty

MAINTAINER yves

ADD install.sh /
RUN chmod u+x /install.sh
RUN /install.sh
ENV PATH /root/miniconda/bin:$PATH

CMD ["/bin/bash"]


<|start_filename|>serverapp/templates/registration.html<|end_filename|>
<!-- registration.html -->
{% extends "layout.html" %}

{% macro render_field(field) %}
  <dd>{{ field.label }}
  <dd>{{ field(**kwargs)|safe }}
  {% if field.errors %}
    <ul class=errors>
    {% for error in field.errors %}
      <dd>{{ error }}</dd>
    {% endfor %}
    </ul>
  {% endif %}
  </dd>
{% endmacro %}

{% block body %}

  <div class="form">
  <form action="{{ url_for('main') }}" method=post
   enctype="multipart/form-data">
    <dl>
      <dd><h1>Fire up your own, temporary Jupyter Notebook server.</h1></dd><br>

      <dd>This whole page is for illustration only.<br>
	You can easily start your own Jupyter server in a Docker container.<br>
	  However, the service might be shut down at any time.<br>
	Files, data, notebooks, etc. then get lost.</dd><br><br>

       {% if error %}
            <p class=errors><strong>Error:</strong> {{ error }}</p>
       {% endif %}  

      <dd>{{ render_field( form.first_name ) }}</dd><br>
      <dd>{{ render_field( form.last_name ) }}</dd><br>
      <dd>{{ render_field( form.email ) }}</dd><br>
      <dd>{{ form.submit | safe }}</dd>

    </dl>
  </form>
  </div>

{% endblock %}


<|start_filename|>serverapp/templates/server.html<|end_filename|>
<!-- server.html -->
{% extends "layout.html" %}

{% block body %}


    <h1>The Jupyter Notebook Server for {{ first_name }}</h1>

	<div class="linktext">
	    <br><br><br>
            Your <b>password</b> to access the server is (copy it): <br><br><b><font color="green">{{ pw }}</font></b><br><br>
   	    To access your server follow this <a href="https://docker.quant-platform.com:{{ port }}" target="_blank">link</a> (and paste the password).<br>
            <br>The server uses SSL encryption &mdash; you might need to add a security exception in your browser.<br>
            <br><br>(Have a look at the example files e.g. for plotting configurations.)
	    <br><br><br>Thank you for visiting.    
	</div>




{% endblock %}


<|start_filename|>serverapp/templates/404.html<|end_filename|>
{% extends "layout.html" %}
{% block body %}

    <br><br>Sorry, but the page your are looking for obviously does not exist. If you typed the URL manually, check again for errors.
    <br><br>Go back to <a href="{{ url_for('main')}}">main page</a>


{% endblock %}


<|start_filename|>jupserver/Dockerfile<|end_filename|>
#
# Docker Container for
# Jupyter Notebook Server
#
# Dr. <NAME>
# The Python Quants GmbH
#

FROM pythoncontainer

MAINTAINER yves

VOLUME /notebooks
WORKDIR /notebooks

ENV PW jupyter
ENV PORT 9000

ADD notebook.sh /
RUN chmod u+x /notebook.sh

ADD jup_cert.pem /root/.ipython/profile_default/
ADD ipython_notebook_config.py /root/.ipython/profile_default/
ADD /ipynbs/* /notebooks/

CMD /notebook.sh PW PORT
