Mercurial > p > roundup > code
diff doc/installation.txt @ 7441:e7df82ae137d
Cleanup docker before 2.3.0b1 release
scripts/Docker/Dockerfile
Document/implement pip_sdist source mode for testing the source
distribution. Change from multiple if's to case statement.
Disable verbose tracing of shells script. Use
--build-arg="VERBOSE=1" to enable set -xv.
scripts/Docker/roundup_start
Report error if demo mode is used with 2.2.0. This catches the
easiest case where build is done using pypi before 2.3.0 final is
released.
Indent demo mode PORT_8080 doc block so it's not lost in a wall of
text.
doc/installation.txt
Document all source --build-args including how to build from pypi
using a version specifier. Break out other uses of --build-arg into
code blocks.
Reference docker compose section rather than referencing
docker-compose.yml.
Clarify docker hub tagging for devel releases.
Minor formatting fixes.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 31 May 2023 19:14:56 -0400 |
| parents | 116ea5ce06ab |
| children | feb970243b97 |
line wrap: on
line diff
--- a/doc/installation.txt Wed May 31 14:37:04 2023 -0400 +++ b/doc/installation.txt Wed May 31 19:14:56 2023 -0400 @@ -1641,9 +1641,9 @@ busybox crond as root vs. non-root, requiring setgrp privs etc). Patches for implementing email support are welcome. -If you want to use a MySQL backend, the `docker-compose.yml` file will -deploy a Roundup container and a MySQL container backend for use with -Roundup. +If you want to use a MySQL backend, see `Docker-compose +Deployment`_ to deploy a Roundup container and a MySQL container +backend for use with Roundup. We recommend you follow the `OSWAP Docker Security practices`_ for your production Roundup instance. @@ -1654,24 +1654,65 @@ Building a Docker Container --------------------------- -To build a docker container using the code in the current directory, -run this build command from the top of the source tree:: +You can build a docker container in one of 4 modes defined by the +``source`` build-arg. + +``--build-arg="source=local"`` + the default if no source is defined. Build using the version in + the source tree by running ``setup.py install``. + +``--build-arg="source=pypi"`` + build the newest production release version deployed to pypi. + If you want to build using a pre-release, you can append + `pip version specifiers + <https://peps.python.org/pep-0440/#version-specifiers>`_ to + `pypi` without embedding any spaces. For example:: + + # install 2.2.0 if available or 2.2.0b1 or 2.2.0b2 etc. + --build-arg="source=pypi~=2.2.0b1" + + # install only a 2.2.0 beta + --build-arg="source=pypi~=2.2.0b1,!=2.2.0" + + Note that versions of Roundup before 2.2 may not run correctly + in a Docker container. + +``--build-arg="source=pip_local"`` + Build using the version in the source tree by running ``pip + install``. This places some files (e.g. man pages, templates) in + different directories from the `local` install but is preferred + by some Python users. + +``--build-arg="source=pip_sdist"`` + This is meant for maintainer/developer use. It installs using + pip from a source distribution (sdist) tarball built by + following the RELEASE.txt. It is meant for testing + releases. Normal users/admins should not use it. + +Build a docker container using the code in the current directory, +with this build command from the top of the source tree:: docker build -t roundup-app -f scripts/Docker/Dockerfile . -You can also build a container using the newest Roundup release on -PyPI, by running:: +Build a container using the newest production (non pre-release) +Roundup release on PyPI, by running:: docker build -t roundup-app --build-arg="source=pypi" \ -f scripts/Docker/Dockerfile . -The docker declares a single volume mounted at -``/usr/src/app/tracker`` inside the container. You will mount your -tracker home directory at this location. The ``/usr/src/app`` path can -be changed by using ``--build-arg="appdir=/new/path"``. - -You can also add additional modules to the docker container by using -`--build-arg="pip_mod=requests setproctitle"`. +Change the ``build-arg`` for building in other modes. + +The Dockerfile declares a single volume mounted at +``/usr/src/app/tracker`` inside the container. You will mount +your tracker home directory at this location. The +``/usr/src/app`` path can be changed by adding:: + + --build-arg="appdir=/new/path" + +You can also add additional modules to the docker container by +using:: + + --build-arg="pip_mod=requests setproctitle" Because of deficiencies in the docker program (see: https://github.com/moby/moby/issues/29110#issuecomment-1100676306), @@ -1683,7 +1724,8 @@ .. _UID at image build time: By default the container runs Roundup using UID 1000. By setting -`--build-arg="roundup_uid=2000"` you can change the UID. +``--build-arg="roundup_uid=2000"`` you can change the UID and +GID. Configuring Roundup in the Container ------------------------------------ @@ -1885,9 +1927,10 @@ -------------------------------- The docker images available from -https://hub.docker.com/r/rounduptracker/roundup -are tagged with: version-build, version, and ``latest`` tags. -For example, the tags when 2.3.0 is released will be: +https://hub.docker.com/r/rounduptracker/roundup are tagged with: +version-build, version, and ``latest`` tags. Only production +releases (not pre-releases) are tagged this way. For example, the +tags when 2.3.0 is released will be: ``rounduptracker/roundup:latest`` is a moving tag that tracks the latest build @@ -1910,11 +1953,12 @@ In addition to the release tags, there may be one or more development tags available. All tags will start with `devel`. For -example: ``rounduptracker/roundup:devel``. - -You should not assume that any ``devel`` tag is static. They ae +example: ``rounduptracker/roundup:2.3.0b1-devel``, +``rounduptracker/roundup:devel`` + +You should not assume that any ``devel`` tag is static. They are mainly for use by Roundup developer/maintainer for testing. There -may be alternate tags starting with ``devel-`` to indicate builds +may be alternate tags ending with ``-devel`` to indicate builds from specific Mercurial versions/hashes. Also the tag may be overwritten to change the underlying Python libraries or images. Unless you like the bleeding edge, these should not be
