@@ -5,7 +5,7 @@ Installing Roundup
55==================
66
77.. contents::
8- :depth: 2
8+ :depth: 3
99 :local:
1010
1111
@@ -216,70 +216,144 @@ base directory, if you do not want to use administrator rights. If you
216216choose to do this, you may have to change Python's search path (sys.path)
217217yourself.
218218
219- Creating a Docker Container
220- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
219+ Docker Support
220+ ~~~~~~~~~~~~~~
221221
222222If you don't want to install it natively, you can create a Docker
223- container. This uses the Dockerfile in the scripts directory. The
224- roundup code in the distribuion and any changes will be used. The
225- build command is::
223+ container. This installs roundup using the `stand-alone web server`_
224+ method. This is an http only install so we suggest putting an https
225+ terminating proxy in front of it.
226226
227- docker build -t roundup-app --rm -f scripts/Dockerfile .
227+ This is a work in progress and patches to improve it are welcome. You
228+ can find the docker config files under the `scripts/Docker` directory
229+ of the source tree.
228230
229- It supports the following backends: anydbm, sqlite, mysql and
230- postgresql. Mysql and postgresql support hasn't been tested, but the
231- Python modules are built and available. See scripts/requirement.txt
232- for the additional modules that are installed .
231+ The dockerized Roundup includes database drivers for anydbm, sqlite,
232+ MySQL and Postgresql (Postgresl is untested). It also includes
233+ additional libraries that are listed in
234+ `scripts/Docker/requirements.txt` .
233235
234- If you want to build a docker from the latest release on PyPI, you can
235- use::
236+ Email support is a work in progress. Outgoing email should work given
237+ an external SMTP server. Reciving email should work by using a
238+ scheduled (cron) job to access email:
239+
240+ * `As a regular job using a mailbox source`_
241+ * `As a regular job using a POP source`_
242+ * `As a regular job using an IMAP source`_
243+
244+ Patches for better email support are welcome.
245+
246+ If you want to use a MySQL backend, the `docker-compose.yml` file will
247+ deploy a Roundup container and a MySQL container backend for use with
248+ Roundup.
249+
250+ Building a Docker Container
251+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
252+
253+ To build a docker container using the code in the current directory,
254+ run this build command from the top of the source tree::
255+
256+ docker build -t roundup-app -f scripts/Docker/Dockerfile .
257+
258+ You can also build a container using the newest Roundup release on
259+ PyPI, by running::
236260
237261 docker build -t roundup-app --build-arg="source=pypi" \
238- --rm - f scripts/Dockerfile .
262+ -f scripts/Docker /Dockerfile .
239263
240- Once the docker is created, run it with::
264+ The docker declares a single volume mounted at
265+ ``/usr/src/app/tracker`` inside the container. You will mount your
266+ tracker home directory at this location.
241267
242- docker run --rm -p 9017:8080 \
243- -v /.../issue.tracker:/usr/src/app/tracker \
244- roundup-app:latest
245268
246- This will make the tracker available at:
247- ``http://yourhost:9017/issues/``.
269+ Configuring Roundup in the Container
270+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
271+
272+ Once the docker is created using one of the build commands above, run
273+ an interactive session it with::
274+
275+ docker run -it --rm -p 9017:8080 \
276+ -v $PWD/tracker:/usr/src/app/tracker roundup-app:latest
277+
278+ The ``-v`` option maps a directory from the host into the docker
279+ container. Note that uid 1000 is used by roundup. So the uid of the
280+ directory (and all files under it) must be uid 1000. This example
281+ assumes your tracker configs are in the tracker subdirectory. Replace
282+ ``$PWD/tracker`` with the full path name to the directory where the
283+ tracker home(s) are to be stored.
248284
249285The ``-p`` option maps an external port (9017) to proxy the roundup
250- server running at port 8080 to the outside. The ``-v`` option maps a
251- directory from the host into the docker container. It should be a
252- tracker home directory. Note that uid 1000 is used by roundup. So the
253- uid of the directory must be 1000.
286+ server running at port 8080 to the outside.
254287
255- If you want to run multiple trackers, create a subdirectory for each
256- tracker home under the volume mount point. Then invoke ``docker run``
257- passing the roundup-server tracker specifications like::
288+ If the tracker directory is empty, the docker container will prompt
289+ you to install a tracker template and prompt you for the database
290+ type.
258291
259- docker run --rm -p 9017:8080 \
260- -v /.../issue.tracker:/usr/src/app/tracker \
261- roundup-app:latest tracker1=tracker1_home tracker2=tracker2_home
292+ Once you have edited and configured ``template/config.ini``, (see
293+ `Configuring your first tracker`) run another interactive session
294+ with::
262295
296+ docker run --rm -it -p 9017:8080 \
297+ -v $PWD/tracker:/usr/src/app/tracker roundup-app:latest
263298
264- This will set up two trackers that can be reached at
265- ``http://yourhost:9017/tracker1/`` and ``http://yourhost:9017/tracker2/`` .
299+ this will initialize the database and attempt to start the server. If
300+ that is successful, use control-c to exit the server .
266301
267- If you need to install and initialize the trackers, you can get a
268- shell without starting the roundup-server using::
302+ Now start the server non-interactively (note no `-it` option) with::
269303
270- docker run -it \
271- -v /.../issue.tracker:/usr/src/app/tracker \
272- --entrypoint sh roundup-app:latest
304+ docker run -p 9017:8080 \
305+ -v $PWD/tracker:/usr/src/app/tracker roundup-app:latest
273306
274- Now you can configure your tracker using ``roundup-admin -i tracker``
275- using the directions below.
307+ Your tracker will be available at: ``http://yourhost:9017/issues/``.
276308
277309If you need to access your container while the server is running you
278310can use::
279311
280312 docker exec -it c0d5 sh
281313
282- where ``c0d5`` is the id prefix for the running container.
314+ where ``c0d5`` is the id prefix for the running container obtained
315+ from ``docker container ls``.
316+
317+ Non-Guided Installation
318+ '''''''''''''''''''''''
319+
320+ If you got a tracker installed using the automatic setup above, you
321+ can skip this section. To manually install and initialize the
322+ trackers, you can get a shell without starting the roundup-server
323+ using::
324+
325+ docker run -it \
326+ -v $PWD/tracker:/usr/src/app/tracker \
327+ --entrypoint sh roundup-app:latest
328+
329+ Now you can configure your tracker using ``roundup-admin -i tracker``
330+ using the directions for `Configuring your first tracker`.
331+
332+ Defining Multiple Trackers
333+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
334+
335+ If you want to run multiple trackers, create a subdirectory for each
336+ tracker home under the volume mount point (``$PWD/tracker``). Then
337+ invoke ``docker run`` passing the roundup-server tracker
338+ specifications like::
339+
340+ docker run --rm -p 9017:8080 \
341+ -v /.../issue.tracker:/usr/src/app/tracker \
342+ roundup-app:latest tracker1=tracker/tracker1_home \
343+ tracker2=tracker/tracker2_home
344+
345+ This will set up two trackers that can be reached at
346+ ``http://yourhost:9017/tracker1/`` and ``http://yourhost:9017/tracker2/``.
347+ The arguments after roundup-app:latest are tracker paths that are
348+ passed to roundup-server.
349+
350+ Docker-compose Deployment
351+ ^^^^^^^^^^^^^^^^^^^^^^^^^
352+
353+ If you want to run using the mysql backend, you can use docker-compose
354+ with ``scripts/Docker/docker-compose.yml``. This will run Roundup and
355+ MySQL in containers. Directions for building using docker-compose are
356+ at the top of the yml file.
283357
284358Configuring your first tracker
285359------------------------------
@@ -452,14 +526,9 @@ Configure a Web Interface
452526
453527There are multiple web interfaces to choose from:
454528
455- 1. `web server cgi-bin`_
456- 2. `cgi-bin for limited-access hosting`_
457- 3. `stand-alone web server`_
458- 4. `Zope product - ZRoundup`_
459- 5. `Apache HTTP Server with mod_wsgi`_
460- 6. `Apache HTTP Server with mod_python`_ (deprecated)
461- 7. `Nginx HTTP Server`_
462- 8. `WSGI Variations`_
529+ .. contents::
530+ :depth: 1
531+ :local:
463532
464533You may need to give the web server user permission to access the tracker home
465534- see the `UNIX environment steps`_ for information. You may also need to
@@ -1005,6 +1074,23 @@ in config.ini should be ``https://tracker.example.org``.
10051074 }
10061075
10071076
1077+ FastCGI (Cherokee, Hiawatha, lighttpd)
1078+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1079+
1080+ The Hiawatha and lighttpd web servers can run Roundup using FastCGI.
1081+ Cherokee can run FastCGI but it also supports wsgi directly using a
1082+ uWSGI, Gnuicorn etc.
1083+
1084+ To run Roundup suing FastCGI, the flup_ package can be used under
1085+ Python 2 and Python 3. We don't have a detailed config for this, but
1086+ the basic idea can be found at:
1087+ https://flask.palletsprojects.com/en/2.0.x/deploying/fastcgi/
1088+
1089+ If you have deployed Roundup using FastCGI and flup we welcome example
1090+ configuration files and instructions.
1091+
1092+ .. _flup: https://pypi.org/project/flup/
1093+
10081094WSGI Variations
10091095~~~~~~~~~~~~~~~
10101096
0 commit comments