From 4727c6e1ee2338f91be6b454f20227e2b11ac6d6 Mon Sep 17 00:00:00 2001 From: Jason Petersen Date: Fri, 15 Sep 2017 12:42:42 -0600 Subject: [PATCH] Update docker-compose instructions Figured we should stop directing users to an old docker-compose binary. In addition, this switches from the -p flag to COMPOSE_PROJECT_NAME to ensure that environment variable is set. -p behaves the same but does not set the variable. See the following link for more. https://github.com/docker/compose/issues/3431#issuecomment-221291167 Finally, I added the -v flag to docker-compose down, which ensures any automatic volumes are removed when the cluster is stopped. --- installation/single_machine_docker.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/installation/single_machine_docker.rst b/installation/single_machine_docker.rst index 1326a967e..91373818e 100644 --- a/installation/single_machine_docker.rst +++ b/installation/single_machine_docker.rst @@ -20,7 +20,7 @@ This section describes setting up a Citus cluster on a single machine using dock sudo usermod -aG docker $USER && exec sg docker newgrp `id -gn` sudo systemctl start docker - sudo curl -sSL https://github.com/docker/compose/releases/download/1.11.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose + sudo curl -sSL https://github.com/docker/compose/releases/download/1.16.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose The above version of Docker Compose is sufficient for running Citus, or you can install the `latest version `_. @@ -34,7 +34,7 @@ Citus uses Docker Compose to run and connect containers holding the database coo .. code-block:: bash curl -L https://raw.githubusercontent.com/citusdata/docker/master/docker-compose.yml > docker-compose.yml - docker-compose -p citus up -d + COMPOSE_PROJECT_NAME=citus docker-compose up -d The first time you start the cluster it builds its containers. Subsequent startups take a matter of seconds. @@ -78,4 +78,4 @@ When you wish to stop the docker containers, use Docker Compose: .. code-block:: bash - docker-compose -p citus down + COMPOSE_PROJECT_NAME=citus docker-compose down -v