]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
docker: Remove deprecated startup arguments
authorYou-Sheng Yang <vicamo@gmail.com>
Thu, 9 Dec 2021 03:38:39 +0000 (11:38 +0800)
committerStephen Finucane <stephen@that.guru>
Wed, 23 Feb 2022 13:43:59 +0000 (13:43 +0000)
This also adds a default CMD directive so that it will launch a
patchwork instance when started with no argument.

Signed-off-by: You-Sheng Yang <vicamo@gmail.com>
Signed-off-by: Stephen Finucane <stephen@that.guru>
[stephenfin] Removed release note, since this is not end-user focused

docker-compose-pg.yml
docker-compose.yml
docs/development/installation.rst
tools/docker/Dockerfile
tools/docker/entrypoint.sh

index 8056d62e98273d2f05b27de2e1cc2213a79c055b..e703b96bbffdac1fd6dc14007f1258c3cd8b76c1 100644 (file)
@@ -16,7 +16,6 @@ services:
         - GID
     depends_on:
       - db
-    command: python3 manage.py runserver 0.0.0.0:8000
     volumes:
       - .:/home/patchwork/patchwork/
     ports:
index 103f19f927119e85e0b3c7c0f249e97c1caae702..b91b7ef8a2b87dff122d8b6f623675246e063646 100644 (file)
@@ -18,7 +18,6 @@ services:
         - GID
     depends_on:
       - db
-    command: python3 manage.py runserver 0.0.0.0:8000
     volumes:
       - .:/home/patchwork/patchwork/
     ports:
index 3507f4357d33a5e92b9cc74e0e679490c618dedd..c5c026946785cdd46b485f2789ec1dec3739b5f3 100644 (file)
@@ -60,7 +60,7 @@ To run a shell within this environment, run:
 
 .. code-block:: shell
 
-   $ docker-compose run --rm web --shell
+   $ docker-compose run --rm web /bin/bash
 
 To run ``django-manage`` commands, such as ``createsuperuser`` or ``migrate``,
 run:
@@ -85,7 +85,7 @@ Likewise, to restore an older version of the database, run:
 
 .. code-block:: shell
 
-   $ docker-compose run --rm -web python manage.py dbrestore
+   $ docker-compose run --rm web python manage.py dbrestore
 
 To run unit tests against the system Python packages, run:
 
index 8680957fb5a3ab043621f02779811ce2aacf29c9..ceacc0911db948ab7ef06ab878f71310c01fc1fb 100644 (file)
@@ -38,5 +38,6 @@ RUN pip install -r /opt/requirements-dev.txt
 
 COPY tools/docker/entrypoint.sh /usr/local/bin/entrypoint.sh
 ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
+CMD ["python3", "manage.py", "runserver", "0.0.0.0:8000"]
 USER patchwork
 WORKDIR /home/patchwork/patchwork
index faa36b3b3f8c3093918b8dd182db28c6300876e7..7e0af5a4b6656c92935c09123d3ca67545ac04df 100755 (executable)
@@ -133,20 +133,10 @@ elif ! test_database; then
     reset_data
 fi
 
-# TODO(stephenfin): Deprecated the --test, --tox, --quick-test and --quick-tox
-# flags in a future release
 if [ $# -eq 0 ]; then
     # we probably ran with --reset and nothing else
     # just exit cleanly
     exit 0
-elif [ "$1" == "--shell" ]; then
-    exec bash
-elif [ "$1" == "--test" ] || [ "$1" == "--quick-test" ]; then
-    shift
-    python manage.py test $@
-elif [ "$1" == "--tox" ] || [ "$1" == "--quick-tox" ]; then
-    shift
-    tox $@
-else # run whatever CMD is set to
-    $@
 fi
+
+exec "$@"