diff --git a/.docker-setup.sh b/.docker-setup.sh index d9c9e7f8ce..dfdc797a38 100755 --- a/.docker-setup.sh +++ b/.docker-setup.sh @@ -24,7 +24,6 @@ missingModules="" #Check everything that needs to be in the $PATH is in there. #Bash doesn't let this work if this is in an if statement for some reason it has to be chained type -P "docker" &>/dev/null && echo "docker found..." || missingModules="${missingModules} docker" -type -P "docker-compose" &>/dev/null && echo "docker-compose found..." || missingModules="${missingModules} docker-compose" type -P "ifconfig" &>/dev/null && echo "ifconfig found..." || missingModules="${missingModules} ifconfig (part of net-tools)" type -P "psql" &>/dev/null && echo "psql found..." || missingModules="${missingModules} psql" type -P "watch" &>/dev/null && echo "watch found..." || missingModules="${missingModules} watch" diff --git a/Makefile b/Makefile index b69f688226..22364ac160 100644 --- a/Makefile +++ b/Makefile @@ -139,14 +139,14 @@ docs-view: docs compose-run: - @ docker-compose -f docker-compose.yml up --build + @ docker compose -f docker-compose.yml up --build compose-run-database: @ echo "**************************************************************************" @ echo "Make sure there are no database credentials in docker_env.txt!" @ echo "**************************************************************************" @ echo - @ docker-compose -f docker-compose.yml -f database-compose.yml up --build + @ docker compose -f docker-compose.yml -f database-compose.yml up --build docker-build: docker-build-backend docker-build-frontend docker-build-database docker-build-rabbitmq diff --git a/docs/8knot.md b/docs/8knot.md index 50b34c909d..5f4a4292f1 100644 --- a/docs/8knot.md +++ b/docs/8knot.md @@ -2,7 +2,7 @@ ## Required Ubuntu Packages ```shell sudo apt install docker && -sudo apt install docker-compose +sudo apt install docker compose ``` If you are running Augur on the same computer, you should already have Python3.x installed. If not, for an Ubuntu 22.x Server also issue this command: @@ -21,11 +21,11 @@ git checkout redis-remap ## Start 8knot To see if everything works: ```shell -sudo docker-compose up --build +sudo docker compose up --build ``` If you want to run 8Knot in the background: ```shell -(nohup sudo docker-compose up --build &) +(nohup sudo docker compose up --build &) ``` diff --git a/docs/dev-osx-install.md b/docs/dev-osx-install.md index c2799cb9fc..c70bac7714 100644 --- a/docs/dev-osx-install.md +++ b/docs/dev-osx-install.md @@ -428,11 +428,11 @@ Note: Augur will run on port 5000 by default (you probably need to change that i You can stop augur with `augur backend stop`, followed by `augur backend kill`. We recommend waiting 5 minutes between commands so Augur can shutdown more gently. There is no issue with data integrity if you issue them seconds apart, its just that stopping is nicer than killing. ### Docker -1. Make sure docker, and docker-compose are both installed +1. Make sure docker, and docker compose are both installed 2. Modify the `environment.txt` file in the root of the repository to include your GitHub and GitLab API keys. 3. If you are already running postgresql on your server you have two choices: - Change the port mappings in the `docker-compose.yml` file to match ports for Postgresql not currently in use. - Change to variables in `environment.txt` to include the correct values for your local, non-docker-container database. 4. `sudo docker build -t augur-new -f docker/backend/Dockerfile .` -5. `sudo docker-compose --env-file ./environment.txt --file docker-compose.yml up` to run the database in a Docker Container or - `sudo docker-compose --env-file ./environment.txt --file docker-compose.yml up` to connect to an already running database. +5. `sudo docker compose --env-file ./environment.txt --file docker-compose.yml up` to run the database in a Docker Container or + `sudo docker compose --env-file ./environment.txt --file docker-compose.yml up` to connect to an already running database. diff --git a/docs/new-install-ubuntu-python-3.10.md b/docs/new-install-ubuntu-python-3.10.md index 4ac0dd838b..3cd7a5a38a 100644 --- a/docs/new-install-ubuntu-python-3.10.md +++ b/docs/new-install-ubuntu-python-3.10.md @@ -368,11 +368,11 @@ Note: Augur will run on port 5000 by default (you probably need to change that i You can stop augur with `augur backend stop`, followed by `augur backend kill`. We recommend waiting 5 minutes between commands so Augur can shutdown more gently. There is no issue with data integrity if you issue them seconds apart, its just that stopping is nicer than killing. ### Docker -1. Make sure docker, and docker-compose are both installed +1. Make sure docker, and docker compose are both installed 2. Modify the `environment.txt` file in the root of the repository to include your GitHub and GitLab API keys. 3. If you are already running postgresql on your server you have two choices: - Change the port mappings in the `docker-compose.yml` file to match ports for Postgresql not currently in use. - Change to variables in `environment.txt` to include the correct values for your local, non-docker-container database. 4. `sudo docker build -t augur-new -f docker/backend/Dockerfile .` -5. `sudo docker-compose --env-file ./environment.txt --file docker-compose.yml up` to run the database in a Docker Container or - `sudo docker-compose --env-file ./environment.txt --file docker-compose.yml up` to connect to an already running database. +5. `sudo docker compose --env-file ./environment.txt --file docker-compose.yml up` to run the database in a Docker Container or + `sudo docker compose --env-file ./environment.txt --file docker-compose.yml up` to connect to an already running database. diff --git a/docs/new-install.md b/docs/new-install.md index 6e872b0e27..060703e691 100644 --- a/docs/new-install.md +++ b/docs/new-install.md @@ -366,11 +366,11 @@ Note: Augur will run on port 5000 by default (you probably need to change that i You can stop augur with `augur backend stop`, followed by `augur backend kill`. We recommend waiting 5 minutes between commands so Augur can shutdown more gently. There is no issue with data integrity if you issue them seconds apart, its just that stopping is nicer than killing. ### Docker -1. Make sure docker, and docker-compose are both installed +1. Make sure docker, and docker compose are both installed 2. Modify the `environment.txt` file in the root of the repository to include your GitHub and GitLab API keys. 3. If you are already running postgresql on your server you have two choices: - Change the port mappings in the `docker-compose.yml` file to match ports for Postgresql not currently in use. - Change to variables in `environment.txt` to include the correct values for your local, non-docker-container database. 4. `sudo docker build -t augur-new -f docker/backend/Dockerfile .` -5. `sudo docker-compose --env-file ./environment.txt --file docker-compose.yml up` to run the database in a Docker Container or - `sudo docker-compose --env-file ./environment.txt --file docker-compose.yml up` to connect to an already running database. +5. `sudo docker compose --env-file ./environment.txt --file docker-compose.yml up` to run the database in a Docker Container or + `sudo docker compose --env-file ./environment.txt --file docker-compose.yml up` to connect to an already running database. diff --git a/docs/source/docker/docker-compose.rst b/docs/source/docker/docker-compose.rst index bd074026c1..afac95478b 100644 --- a/docs/source/docker/docker-compose.rst +++ b/docs/source/docker/docker-compose.rst @@ -44,18 +44,18 @@ To run Augur **without** the database container: .. code-block:: bash - docker-compose -f docker-compose.yml up + docker compose -f docker-compose.yml up To run Augur **with** the database container: .. code-block:: bash - docker-compose -f docker-compose.yml -f database-compose.yml up + docker compose -f docker-compose.yml -f database-compose.yml up Stopping the containers ------------------------- -To stop the containers, run ``docker-compose down --remove-orphans``. The flag is necessary to stop the database container if you used one; run the command again to delete them. +To stop the containers, run ``docker compose down --remove-orphans``. The flag is necessary to stop the database container if you used one; run the command again to delete them. Once you've got your container up and running, checkout out `how to use them `_ diff --git a/docs/source/docker/getting-started.rst b/docs/source/docker/getting-started.rst index 1ca0e607d4..729ba5171c 100644 --- a/docs/source/docker/getting-started.rst +++ b/docs/source/docker/getting-started.rst @@ -22,7 +22,7 @@ If you are less familiar with Docker, or experience issues you cannot resolve at Credentials ------------ -Before you get started with Docker, you'll need to set up a PostgreSQL instance either locally or using a remote host. Alternatively, you can also set up the database within a docker container either manually or through docker-compose. +Before you get started with Docker, you'll need to set up a PostgreSQL instance either locally or using a remote host. Alternatively, you can also set up the database within a docker container either manually or through docker compose. .. note:: @@ -58,7 +58,7 @@ First, you'll need to clone the repository. In your terminal, run: Now that you've got your external database credentials (if you are using one) and your access token, we'll need to set environment variables manually. -Your database credentials and other environment variables used at runtime are stored in a file when running manually and are taken from the active bash session when using docker-compose. +Your database credentials and other environment variables used at runtime are stored in a file when running manually and are taken from the active bash session when using docker compose. You can provide your own ``.env`` file to pull from. The file should have the below format and set all the variables to some value. diff --git a/docs/source/docker/quick-start.rst b/docs/source/docker/quick-start.rst index b271fe3dc4..2660eb3107 100644 --- a/docs/source/docker/quick-start.rst +++ b/docs/source/docker/quick-start.rst @@ -45,5 +45,5 @@ Before you get off to such a quick start, go ahead and .. code-block:: bash sudo docker build -t augur-docker -f docker/backend/Dockerfile . - sudo docker-compose up + sudo docker compose up diff --git a/docs/source/docker/toc.rst b/docs/source/docker/toc.rst index ac9629913f..2fc42a4e9e 100644 --- a/docs/source/docker/toc.rst +++ b/docs/source/docker/toc.rst @@ -7,7 +7,7 @@ Docker quick-start getting-started docker - docker-compose + docker compose usage diff --git a/docs/source/docker/usage.rst b/docs/source/docker/usage.rst index a20667f739..03e4c92deb 100644 --- a/docs/source/docker/usage.rst +++ b/docs/source/docker/usage.rst @@ -35,10 +35,10 @@ By default, the only logs shown by the container are the logs of Augur's main da .. code-block:: bash # to quickly view the most recent logs - $ docker-compose logs + $ docker compose logs # to watch the logs in real-time (like tail -f) - $ docker-compose logs -f + $ docker compose logs -f As for worker logs. They are currently a work in progress to be made easier to view. Shortly, they will automatically populate on the host machine and it will not be necessary to step inside the container. diff --git a/docs/source/getting-started/dev-osx-install.rst b/docs/source/getting-started/dev-osx-install.rst index dcf16ee976..05285da207 100644 --- a/docs/source/getting-started/dev-osx-install.rst +++ b/docs/source/getting-started/dev-osx-install.rst @@ -603,7 +603,7 @@ killing. Docker ~~~~~~ -1. Make sure docker, and docker-compose are both installed +1. Make sure docker, and docker compose are both installed 2. Modify the ``environment.txt`` file in the root of the repository to include your GitHub and GitLab API keys. 3. If you are already running postgresql on your server you have two @@ -615,7 +615,7 @@ Docker values for your local, non-docker-container database. 4. ``sudo docker build -t augur-new -f docker/backend/Dockerfile .`` -5. ``sudo docker-compose --env-file ./environment.txt --file docker-compose.yml up`` +5. ``sudo docker compose --env-file ./environment.txt --file docker-compose.yml up`` to run the database in a Docker Container or - ``sudo docker-compose --env-file ./environment.txt --file docker-compose.yml up`` + ``sudo docker compose --env-file ./environment.txt --file docker-compose.yml up`` to connect to an already running database. diff --git a/docs/source/getting-started/new-install.rst b/docs/source/getting-started/new-install.rst index ba38fb7758..3fd45f4a97 100644 --- a/docs/source/getting-started/new-install.rst +++ b/docs/source/getting-started/new-install.rst @@ -503,7 +503,7 @@ killing. Docker ~~~~~~ -1. Make sure docker, and docker-compose are both installed +1. Make sure docker, and docker compose are both installed 2. Modify the ``environment.txt`` file in the root of the repository to include your GitHub and GitLab API keys. 3. If you are already running postgresql on your server you have two @@ -515,7 +515,7 @@ Docker values for your local, non-docker-container database. 4. ``sudo docker build -t augur-new -f docker/backend/Dockerfile .`` -5. ``sudo docker-compose --env-file ./environment.txt --file docker-compose.yml up`` +5. ``sudo docker compose --env-file ./environment.txt --file docker-compose.yml up`` to run the database in a Docker Container or - ``sudo docker-compose --env-file ./environment.txt --file docker-compose.yml up`` + ``sudo docker compose --env-file ./environment.txt --file docker-compose.yml up`` to connect to an already running database. diff --git a/docs/source/quick-start.rst b/docs/source/quick-start.rst index 906f4beea7..9aa7bb96e5 100644 --- a/docs/source/quick-start.rst +++ b/docs/source/quick-start.rst @@ -157,7 +157,7 @@ killing. Docker ~~~~~~ -1. Make sure docker, and docker-compose are both installed +1. Make sure docker, and docker compose are both installed 2. Modify the ``environment.txt`` file in the root of the repository to include your GitHub and GitLab API keys. 3. If you are already running postgresql on your server you have two @@ -169,9 +169,9 @@ Docker values for your local, non-docker-container database. 4. ``sudo docker build -t augur-new -f docker/backend/Dockerfile .`` -5. ``sudo docker-compose --env-file ./environment.txt --file docker-compose.yml up`` +5. ``sudo docker compose --env-file ./environment.txt --file docker-compose.yml up`` to run the database in a Docker Container or - ``sudo docker-compose --env-file ./environment.txt --file docker-compose.yml up`` + ``sudo docker compose --env-file ./environment.txt --file docker-compose.yml up`` to connect to an already running database. diff --git a/scripts/docker/docker-setup-database.sh b/scripts/docker/docker-setup-database.sh index 62c7aaf176..c682938051 100755 --- a/scripts/docker/docker-setup-database.sh +++ b/scripts/docker/docker-setup-database.sh @@ -46,21 +46,21 @@ fi echo "Tearing down old docker stack..." -docker-compose -f docker-compose.yml -f database-compose.yml down --remove-orphans +docker compose -f docker-compose.yml -f database-compose.yml down --remove-orphans #Run docker stack in background to catch up to later echo "Starting set up of docker stack..." -nohup docker-compose -f docker-compose.yml -f database-compose.yml up --no-recreate &>/tmp/dockerComposeLog & +nohup docker compose -f docker-compose.yml -f database-compose.yml up --no-recreate &>/tmp/dockerComposeLog & PIDOS=$! #While the containers are up show a watch monitor that shows container status and live feed from logs printf "\nNow showing active docker containers:\n" -watch -n1 --color 'docker-compose -f docker-compose.yml -f database-compose.yml ps && echo && tail -n 30 /tmp/dockerComposeLog && echo "Ctrl+C to Exit"' +watch -n1 --color 'docker compose -f docker-compose.yml -f database-compose.yml ps && echo && tail -n 30 /tmp/dockerComposeLog && echo "Ctrl+C to Exit"' printf "\n" #Stop the process and clean up dead containers on SIGINT. kill -15 $PIDOS #Cleaning up dead containers echo "Cleaning up dead containers... " -docker-compose -f docker-compose.yml -f database-compose.yml down --remove-orphans +docker compose -f docker-compose.yml -f database-compose.yml down --remove-orphans bash scripts/docker/cleanup.sh diff --git a/scripts/docker/docker-setup-external.sh b/scripts/docker/docker-setup-external.sh index 8454382f75..be6336807c 100755 --- a/scripts/docker/docker-setup-external.sh +++ b/scripts/docker/docker-setup-external.sh @@ -59,14 +59,14 @@ then fi echo "AUGUR_DB_PASSWORD=$dbPassword" >> docker_env.txt else - #docker_env.txt should always be present in a docker-compose build otherwise it can cause issues for the database. + #docker_env.txt should always be present in a docker compose build otherwise it can cause issues for the database. if [[ ! -f "docker_env.txt" ]] then echo "docker_env.txt not found. Please add environment variables in this file or restart the script and choose to prompt db credentials." exit 1 fi - #Copy host name to docker-compose env file. + #Copy host name to docker compose env file. cat docker_env.txt | grep AUGUR_DB_HOST >> .env fi @@ -122,21 +122,21 @@ else fi echo "Tearing down old docker stack..." -docker-compose -f docker-compose.yml down --remove-orphans +docker compose -f docker-compose.yml down --remove-orphans #Run docker stack in background to catch up to later echo "Starting set up of docker stack..." -nohup docker-compose -f docker-compose.yml up --no-recreate &>/tmp/dockerComposeLog & +nohup docker compose -f docker-compose.yml up --no-recreate &>/tmp/dockerComposeLog & PIDOS=$! #While the containers are up show a watch monitor that shows container status and live feed from logs printf "\nNow showing active docker containers:\n" -watch -n1 --color 'docker-compose ps && echo && tail -n 30 /tmp/dockerComposeLog && echo "Ctrl+C to Exit"' +watch -n1 --color 'docker compose ps && echo && tail -n 30 /tmp/dockerComposeLog && echo "Ctrl+C to Exit"' printf "\n" #Stop the process and clean up dead containers on SIGINT. kill -15 $PIDOS #Cleaning up dead containers echo "Cleaning up dead containers... " -docker-compose -f docker-compose.yml down --remove-orphans +docker compose -f docker-compose.yml down --remove-orphans bash scripts/docker/cleanup.sh