This is an automated email from the ASF dual-hosted git repository.
brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git
The following commit(s) were added to refs/heads/master by this push:
new ad43b5de4 replace deprecated "docker-compose" cmd with "docker compose"
ad43b5de4 is described below
commit ad43b5de40ebda6274b18f39531007121e397e6e
Author: Dave Brondsema <[email protected]>
AuthorDate: Thu Oct 5 14:53:33 2023 -0400
replace deprecated "docker-compose" cmd with "docker compose"
---
Allura/docs/development/contributing.rst | 8 +++---
Allura/docs/getting_started/administration.rst | 6 ++---
Allura/docs/getting_started/installation.rst | 36 +++++++++++++-------------
scripts/jenkins-run.sh | 26 +++++++++----------
4 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/Allura/docs/development/contributing.rst
b/Allura/docs/development/contributing.rst
index d02207aaa..cf3224ced 100644
--- a/Allura/docs/development/contributing.rst
+++ b/Allura/docs/development/contributing.rst
@@ -198,10 +198,10 @@ as ``pudb`` are also available.
To do this with docker, the commands are::
- docker-compose run --rm web pip install ipdb
- docker-compose stop web taskd
- docker-compose run --rm --service-ports web gunicorn --reload --paste
Allura/docker-dev.ini -b :8088
- docker-compose run --rm taskd paster taskd docker-dev.ini --nocapture
+ docker compose run --rm web pip install ipdb
+ docker compose stop web taskd
+ docker compose run --rm --service-ports web gunicorn --reload --paste
Allura/docker-dev.ini -b :8088
+ docker compose run --rm taskd paster taskd docker-dev.ini --nocapture
Testing
diff --git a/Allura/docs/getting_started/administration.rst
b/Allura/docs/getting_started/administration.rst
index 44694c048..03b413f21 100644
--- a/Allura/docs/getting_started/administration.rst
+++ b/Allura/docs/getting_started/administration.rst
@@ -112,13 +112,13 @@ Scripts are in the :file:`scripts/` directory and run
slightly differently, via
paster script development.ini ../scripts/add_user_to_group.py -- --nbhd
/u/ johndoe Admin
-To run these when using docker, prefix with :code:`docker-compose run taskd`
and use :file:`docker-dev.ini` like::
+To run these when using docker, prefix with :code:`docker compose run taskd`
and use :file:`docker-dev.ini` like::
- docker-compose run --rm taskd paster create-neighborhood docker-dev.ini
myneighborhood myuser ...
+ docker compose run --rm taskd paster create-neighborhood docker-dev.ini
myneighborhood myuser ...
Or with the docker *production* setup::
- docker-compose run --rm oneoff paster create-neighborhood
/allura-data/production.ini myneighborhood myuser ...
+ docker compose run --rm oneoff paster create-neighborhood
/allura-data/production.ini myneighborhood myuser ...
Tasks can be run via the web interface at http://MYSITE/nf/admin/task_manager
You must know
diff --git a/Allura/docs/getting_started/installation.rst
b/Allura/docs/getting_started/installation.rst
index 20b212c1b..035c3f5ba 100644
--- a/Allura/docs/getting_started/installation.rst
+++ b/Allura/docs/getting_started/installation.rst
@@ -34,7 +34,7 @@ First run
`Download the latest release <http://www.apache.org/dyn/closer.cgi/allura/>`_
of Allura, or `clone from git
<https://forge-allura.apache.org/p/allura/git/ci/master/tree/>`_ for the
bleeding edge.
-Install `Docker <http://docs.docker.com/installation/>`_ and the latest
version of `Docker Compose <https://docs.docker.com/compose/install/>`_.
+Install `Docker <http://docs.docker.com/installation/>`_.
On Linux, you may need to `create a docker group
<https://docs.docker.com/engine/install/linux-postinstall/>`_.
.. note::
@@ -54,7 +54,7 @@ On Linux, you may need to `create a docker group
<https://docs.docker.com/engine
base_url = http://hostname-or-ip:8080
Replace :kbd:`hostname-or-ip` with the actual hostname or external IP
address. If you change this setting later,
- just run :kbd:`docker-compose restart web`
+ just run :kbd:`docker compose restart web`
Run the following commands in your allura directory:
@@ -63,7 +63,7 @@ Build/fetch all required images:
.. code-block:: bash
- docker-compose build
+ docker compose build
.. note::
@@ -73,29 +73,29 @@ Python and JS package setup (and first containers started):
.. code-block:: bash
- docker-compose run --rm web scripts/init-docker-dev.sh
+ docker compose run --rm web scripts/init-docker-dev.sh
Restart SOLR container, so it will see changes from the command above and
create index:
.. code-block:: bash
- docker-compose restart solr
+ docker compose restart solr
Initialize database with test data:
.. code-block:: bash
- docker-compose run --rm taskd paster setup-app docker-dev.ini
+ docker compose run --rm taskd paster setup-app docker-dev.ini
.. note::
- If you want to skip test data creation you can instead run:
:code:`docker-compose run --rm -e ALLURA_TEST_DATA=False taskd paster setup-app
docker-dev.ini`
+ If you want to skip test data creation you can instead run: :code:`docker
compose run --rm -e ALLURA_TEST_DATA=False taskd paster setup-app
docker-dev.ini`
Start containers in the background:
.. code-block:: bash
- docker-compose up -d
+ docker compose up -d
You're up and running! Visit localhost:8080 (or whatever IP address you're
running Docker on). Then
see our :ref:`post-setup-instructions` and read more below about the Docker
environment for Allura.
@@ -159,48 +159,48 @@ Restarting all containers:
.. code-block:: bash
- docker-compose up -d
+ docker compose up -d
View logs from all services:
.. code-block:: bash
- docker-compose logs -f
+ docker compose logs -f
You can specify one or more services to view logs only from them, e.g. to see
outgoing mail:
.. code-block:: bash
- docker-compose logs -f outmail
+ docker compose logs -f outmail
Update requirements and reinstall apps:
.. code-block:: bash
- docker-compose run --rm web pip install -r requirements.txt
- docker-compose run --rm web ./rebuild-all.bash
+ docker compose run --rm web pip install -r requirements.txt
+ docker compose run --rm web ./rebuild-all.bash
You may want to restart at least "taskd" container after that in order for it
to
-pick up changes. Run :code:`docker-compose restart taskd`
+pick up changes. Run :code:`docker compose restart taskd`
Run all tests:
.. code-block:: bash
- docker-compose run --rm web ./run_tests
+ docker compose run --rm web ./run_tests
Running subset of tests:
.. code-block:: bash
- docker-compose run --rm web bash -c 'cd ForgeGit && pytest
forgegit/tests/functional/test_controllers.py::TestFork'
+ docker compose run --rm web bash -c 'cd ForgeGit && pytest
forgegit/tests/functional/test_controllers.py::TestFork'
Connecting to mongo using a container:
.. code-block:: bash
- docker-compose run --rm mongo mongo --host mongo
+ docker compose run --rm mongo mongo --host mongo
.. _post-setup-instructions:
@@ -337,7 +337,7 @@ The following command can be used for quick and easy
monitoring of outgoing emai
.. code-block:: bash
- docker-compose logs -f outmail
+ docker compose logs -f outmail
If you are running locally without docker, run this command. Be sure the port
matches the :samp:`smtp_port` from
your :file:`development.ini` (8826 by default).
diff --git a/scripts/jenkins-run.sh b/scripts/jenkins-run.sh
index fda940b80..8d895a9c8 100755
--- a/scripts/jenkins-run.sh
+++ b/scripts/jenkins-run.sh
@@ -30,7 +30,7 @@ echo hostname: `hostname --short`
echo whoami: `whoami`
echo NODE_NAME: $NODE_NAME
echo docker: `docker version`
-echo docker compose: `docker-compose version`
+echo docker compose: `docker compose version`
echo path: $PATH
echo workspace: $WORKSPACE
echo jenkins_home: $JENKINS_HOME
@@ -45,31 +45,31 @@ echo
"==========================================================================
rm -rf ./allura-data
git clean -f -x # remove test.log, pytest.junit.xml etc (don't use -d since
it'd remove our venv dir)
-docker-compose down
+docker compose down
echo
echo
"============================================================================="
echo "Run: build docker image"
echo
"============================================================================="
-docker-compose build --build-arg PY_VERSION=$PY_VERSION
+docker compose build --build-arg PY_VERSION=$PY_VERSION
echo
echo
"============================================================================="
echo "Setup: venv, pip, pysvn, ./rebuild-all.sh, npm, etc."
echo
"============================================================================="
-docker-compose run --rm web scripts/init-docker-dev.sh
+docker compose run --rm web scripts/init-docker-dev.sh
echo
echo
"============================================================================="
echo "Starting up docker containers"
echo
"============================================================================="
-docker-compose up -d web
+docker compose up -d web
echo
echo
"============================================================================="
echo "Docker Container Info:"
echo
"============================================================================="
-docker-compose exec -T web bash -c '
+docker compose exec -T web bash -c '
echo python path: `which python; python -V`;
git --version;
svn --version;
@@ -83,10 +83,10 @@ echo
"==========================================================================
echo "Setup: tests"
echo
"============================================================================="
# set up test dependencies
-docker-compose exec -T web pip install -q -r requirements-dev.txt
+docker compose exec -T web pip install -q -r requirements-dev.txt
# make test git repos safe to run even though owned by different user
-docker-compose exec -T web chown root:root -R /allura
+docker compose exec -T web chown root:root -R /allura
echo
echo
"============================================================================="
@@ -94,11 +94,11 @@ echo "Run: tests"
echo
"============================================================================="
# use "Allura* Forge* scripts" instead of "." so that .allura-venv doesn't get
checked too (and '.' gives './' prefixed results which don't work out)
-docker-compose exec -T web bash -c "pyflakes Allura* Forge* scripts | awk -F\:
'{printf \"%s:%s: [E]%s\n\", \$1, \$2, \$3}' > pyflakes.txt"
-docker-compose exec -T web bash -c "pycodestyle Allura* Forge* scripts >
pep8.txt"
+docker compose exec -T web bash -c "pyflakes Allura* Forge* scripts | awk -F\:
'{printf \"%s:%s: [E]%s\n\", \$1, \$2, \$3}' > pyflakes.txt"
+docker compose exec -T web bash -c "pycodestyle Allura* Forge* scripts >
pep8.txt"
# TODO: ALLURA_VALIDATION=all
-docker-compose exec -T -e LANG=en_US.UTF-8 web ./run_tests
--junit-xml=pytest.junit.xml # --with-coverage --cover-erase
+docker compose exec -T -e LANG=en_US.UTF-8 web ./run_tests
--junit-xml=pytest.junit.xml # --with-coverage --cover-erase
retcode=$?
#find . -name .coverage -maxdepth 2 | while read coveragefile; do pushd
`dirname $coveragefile`; coverage xml --include='forge*,allura*'; popd; done;
@@ -107,8 +107,8 @@ echo
echo
"============================================================================="
echo "Shutdown"
echo
"============================================================================="
-docker-compose down
+docker compose down
docker container prune -f
docker volume prune -f
-exit $retcode
\ No newline at end of file
+exit $retcode