From c4390f821598afaa699d7513315e9613aa8b7e30 Mon Sep 17 00:00:00 2001 From: Clement Verna Date: Jan 08 2018 09:23:08 +0000 Subject: Move docker-compose env to f27 and add a Readme section Signed-off-by: Clement Verna --- diff --git a/README.rst b/README.rst index 5a43be4..5bc6ee0 100644 --- a/README.rst +++ b/README.rst @@ -55,6 +55,25 @@ host machine. if you want Pagure to provide valid URLs in the UI for git repositories, you will need to adjust Pagure's configuration found in ~/pagure.cfg on the guest. +Docker Compose +^^^^^^^^^^^^^^ + +A docker compose environment is available to run pagure. First use the following +command to build the containers. :: + + $ docker-compose -f dev/docker-compose.yml build + +Once all the containers are built, run the following command to start the containers. :: + + $ docker-compose -f dev/docker-compose.yml up -d + +Once all the containers have started, you can access pagure on http://localhost:5000 + +To stop the containers, run the following :: + + $ docker-compose -f dev/docker-compose.yml stop + +More information about docker-compose cli see https://docs.docker.com/compose/reference/. Manually ^^^^^^^^ diff --git a/dev/docker-compose.yml b/dev/docker-compose.yml index f12e3de..90806ab 100644 --- a/dev/docker-compose.yml +++ b/dev/docker-compose.yml @@ -1,7 +1,5 @@ version: '3.2' volumes: - repos: - attachments: postgres: services: web: @@ -34,7 +32,7 @@ services: image: pagure-worker:latest volumes: - type: volume - source: ../lcl/epos + source: ../lcl/repos target: /repos read_only: false - type: volume @@ -44,7 +42,7 @@ services: - ..:/code:z environment: - PYTHONPATH=. - - PAGURE_CONFIG=/code/openshift.cfg + - PAGURE_CONFIG=/code/dev/openshift.cfg ev: build: context: ./docker @@ -58,7 +56,7 @@ services: - ..:/code:z environment: - PYTHONPATH=. - - PAGURE_CONFIG=/code/openshift.cfg + - PAGURE_CONFIG=/code/dev/openshift.cfg redis: image: redis postgresql: diff --git a/dev/docker/ev b/dev/docker/ev index ca07dcf..530c544 100644 --- a/dev/docker/ev +++ b/dev/docker/ev @@ -1,4 +1,4 @@ -FROM registry.fedoraproject.org/fedora:25 +FROM registry.fedoraproject.org/fedora:27 MAINTAINER Patrick Uiterwijk VOLUME ["/repos"] diff --git a/dev/docker/web b/dev/docker/web index e0a14c1..62ec8b9 100644 --- a/dev/docker/web +++ b/dev/docker/web @@ -1,4 +1,4 @@ -FROM registry.fedoraproject.org/fedora:25 +FROM registry.fedoraproject.org/fedora:27 MAINTAINER Patrick Uiterwijk VOLUME ["/repos"] diff --git a/dev/docker/web-run b/dev/docker/web-run index 7886379..41ef4be 100644 --- a/dev/docker/web-run +++ b/dev/docker/web-run @@ -4,9 +4,9 @@ then echo "Giving Postgres time to start" sleep 10 touch /attachments/inited - PAGURE_CONFIG=/code/openshift.cfg python createdb.py --initial /code/openshift_alembic.ini + PAGURE_CONFIG=/code/dev/openshift.cfg python createdb.py --initial /code/dev/openshift_alembic.ini else - alembic --config /code/openshift_alembic.ini upgrade head + alembic --config /code/dev/openshift_alembic.ini upgrade head fi -exec /usr/bin/python /code/runserver.py --host 0.0.0.0 --config /code/openshift.cfg +exec /usr/bin/python /code/runserver.py --host 0.0.0.0 --config /code/dev/openshift.cfg diff --git a/dev/docker/worker b/dev/docker/worker index e866952..e0d8042 100644 --- a/dev/docker/worker +++ b/dev/docker/worker @@ -1,4 +1,4 @@ -FROM registry.fedoraproject.org/fedora:25 +FROM registry.fedoraproject.org/fedora:27 MAINTAINER Patrick Uiterwijk VOLUME ["/repos"]