Documentation: Update documentation to refer only to Docker Compose v2 command (#4650)

* Replaces references to docker-compose (the v1 executable) with docker compose (the v2 plugin) as well as fixing up some referenes between the tool vs the command

* Update docs/setup.md

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>

* Replaces references to docker-compose (the v1 executable) with docker compose (the v2 plugin) as well as fixing up some referenes between the tool vs the command

---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
Trenton H
2023-11-20 20:14:33 -08:00
committed by GitHub
parent 0eb17e7102
commit c8ee35692c
16 changed files with 85 additions and 87 deletions

View File

@@ -56,14 +56,9 @@ if ! command -v docker &> /dev/null ; then
exit 1
fi
DOCKER_COMPOSE_CMD="docker-compose"
if ! command -v ${DOCKER_COMPOSE_CMD} &> /dev/null ; then
if docker compose version &> /dev/null ; then
DOCKER_COMPOSE_CMD="docker compose"
else
echo "docker-compose executable not found. Is docker-compose installed?"
exit 1
fi
if ! command -v docker compose &> /dev/null ; then
echo "docker compose executable not found. Is docker compose installed?"
exit 1
fi
# Check if user has permissions to run Docker by trying to get the status of Docker (docker status).
@@ -382,16 +377,16 @@ if [ "$l1" -eq "$l2" ] ; then
fi
${DOCKER_COMPOSE_CMD} pull
docker compose pull
if [ "$DATABASE_BACKEND" == "postgres" ] || [ "$DATABASE_BACKEND" == "mariadb" ] ; then
echo "Starting DB first for initilzation"
${DOCKER_COMPOSE_CMD} up --detach db
docker compose up --detach db
# hopefully enough time for even the slower systems
sleep 15
${DOCKER_COMPOSE_CMD} stop
docker compose stop
fi
${DOCKER_COMPOSE_CMD} run --rm -e DJANGO_SUPERUSER_PASSWORD="$PASSWORD" webserver createsuperuser --noinput --username "$USERNAME" --email "$EMAIL"
docker compose run --rm -e DJANGO_SUPERUSER_PASSWORD="$PASSWORD" webserver createsuperuser --noinput --username "$USERNAME" --email "$EMAIL"
${DOCKER_COMPOSE_CMD} up --detach
docker compose up --detach