Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 796 Bytes

File metadata and controls

20 lines (14 loc) · 796 Bytes

Deployment using Docker Context with Compose

By creating Contexts to remote devices, the stack can be deployed to remote machines without having to copy the generated docker-compose.yml file to them.

  1. Create an SSH Docker Context using:

    docker context create <name_of_context> --docker "host=ssh://<user>@<remote-machine_ip or hostname>
  2. Copy the generated configurations to the remote machine (see Caveats above in order to avoid filesystem mismatch errors). No need to copy the docker-compose.yml file

  3. Deploy the Compose application using:

    docker --context=<name_of_context_from_above> compose --project-directory=deploy up -d