diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..600fdf78 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM fedora:24 + +# so we don't have to compile those when fetched from PyPI +RUN dnf install -y python-pip python2-setuptools python2-cffi python2-zmq python2-cryptography koji python2-pdc-client && \ + dnf autoremove -y && dnf clean all && \ + mkdir /opt/fm-orchestrator/ +WORKDIR /opt/fm-orchestrator/ +COPY ./requirements.txt /opt/fm-orchestrator/ +RUN pip install --user -r ./requirements.txt + +COPY koji.conf /etc/rida/ + +COPY . /opt/fm-orchestrator/ + +RUN python2 ./manage.py upgradedb && ./generate_localhost_cert.sh +CMD ["python2", "manage.py", "runssl"] diff --git a/README.rst b/README.rst index 219966b5..751d6827 100644 --- a/README.rst +++ b/README.rst @@ -315,3 +315,20 @@ E.g. ``"scmurl": "git://pkgs.stg.fedoraproject.org/modules/testmodule.git?#020ea The toplevel directory containing the trees for each architecture of a module. This field is only present when a module finished building, i.e. with the states 'done' or 'ready'. + + +Development +=========== + +You can use docker containers for development. Here's a guide how to setup `docker `_ and `docker-compose `_. + +After your docker engine is set up and running, and docker-compose installed you can start whole system with a single command:: + + $ sudo docker-compose up + +It may happen that you will run into issues and the container won't start properly. Best thing to do in that case is to rebuild the environment from scratch:: + + $ sudo docker-compose down -v + $ sudo docker-compose build --no-cache --pull + +First command will stop and remove all containers and volumes and second command will pull latest base image and perform a clean build without cache. diff --git a/Vagrantfile b/Vagrantfile index a6a43800..f92dc768 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -6,6 +6,8 @@ $script = <