diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f84c26c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +# Usage example: + +# docker build -t mixmatch . + +# sudo docker run \ +# --interactive --tty \ +# --volume /etc/mixmatch/mixmatch.conf:/etc/mixmatch/mixmatch.conf \ +# --publish 5001:5001 mixmatch + +# Make sure that all localhost/127.0.0.1 references in the config are replaced +# with the IP of the idp and that it is configured correctly otherwise + +FROM python:3-onbuild + +RUN pip install uwsgi + +EXPOSE 5001 +CMD ["bash", "/usr/src/app/run_proxy.sh"] diff --git a/doc/source/installation.rst b/doc/source/installation.rst index c51ddfc..c9d3e9a 100644 --- a/doc/source/installation.rst +++ b/doc/source/installation.rst @@ -37,6 +37,22 @@ To run the proxy with Apache in Ubuntu: :: $ service apache2 reload +Running in a Docker Container +============================= +The proxy can be run in a Docker container using the provided Dockerfile. +When it is run, the container port 5001 must be mapped to the port 5001 on the +host and your configuration file must be passed in as a data volume, +for example :: + + sudo docker run \ + --interactive --tty \ + --volume /etc/mixmatch/mixmatch.conf:////mixmatch.conf: \ + --publish 5001:5001 mixmatch + +You will still need to edit the configuration file and do the rest of the setup +normally on the host. + + Configuration ============= The proxy searches for the configuration file ``mixmatch.conf`` in the @@ -113,4 +129,3 @@ in both the IdP and every SP, add the following to [oslo_messaging_notifications] driver = messaging topics = notifications -