From 02412d162e90c0fd08b446781bd60091e24cd41b Mon Sep 17 00:00:00 2001 From: Wouter Born Date: Wed, 14 Oct 2026 14:06:41 +0200 Subject: [PATCH] Replace `docker-compose` commands with `docker compose` Fixes #16 --- docs/20-quick-start.md | 10 +++--- .../010-preparing-the-environment.md | 8 +++-- docs/developer-guide/020-setting-up-an-ide.md | 4 +-- .../030-docker-compose-profiles.md | 12 +++---- .../100-system-administration.md | 36 +++++++++---------- .../110-working-on-ui-and-apps.md | 2 +- .../150-create-docker-machine-on-aws-ec2.md | 10 +++--- ...ive-lorawan-sensor-data-from-chirpstack.md | 2 +- .../010-deploying/10-custom-deployment.md | 2 +- .../010-deploying/70-balena-deployment.md | 8 ++--- .../20-ikea-tr\303\245dfri-agent.md" | 2 +- 11 files changed, 49 insertions(+), 47 deletions(-) diff --git a/docs/20-quick-start.md b/docs/20-quick-start.md index 9e7b6535..025c302b 100644 --- a/docs/20-quick-start.md +++ b/docs/20-quick-start.md @@ -11,13 +11,13 @@ You can quickly try the online demo with restricted access, login credentials ar [Online demo](https://demo.openremote.app/manager/?realm=smartcity) The quickest way to get your own environment with full access is to make use of our Docker images (both `amd64` and `arm64` are supported). -1. Make sure you have [Docker Desktop](https://www.docker.com/products/docker-desktop) installed (v18+). +1. Install [Docker Desktop](https://www.docker.com/products/docker-desktop), which includes Docker Compose. 2. Download the Docker Compose file: [OpenRemote Stack](https://raw.githubusercontent.com/openremote/core/main/docker-compose.yml) (Right click 'Save link as...') 3. In a terminal `cd` to where you just saved the compose file and then run: ```shell -docker-compose pull -docker-compose -p openremote up +docker compose pull +docker compose -p openremote up ``` If all goes well then you should now be able to access the OpenRemote Manager UI at [https://localhost](https://localhost). You will need to accept the self-signed certificate, see [here](https://www.technipages.com/google-chrome-bypass-your-connection-is-not-private-message) for details how to do this in Chrome (similar for other browsers). @@ -32,13 +32,13 @@ The URL you use to access the system is important, the default is configured as BASH: ```shell -OR_HOSTNAME=192.168.1.1 docker-compose -p openremote up -d +OR_HOSTNAME=192.168.1.1 docker compose -p openremote up -d ``` or CMD: ```shell -cmd /C "set OR_HOSTNAME=192.168.1.1 && docker-compose -p openremote up -d" +cmd /C "set OR_HOSTNAME=192.168.1.1 && docker compose -p openremote up -d" ``` ## What next diff --git a/docs/developer-guide/010-preparing-the-environment.md b/docs/developer-guide/010-preparing-the-environment.md index 35f00695..4a4ff2f9 100644 --- a/docs/developer-guide/010-preparing-the-environment.md +++ b/docs/developer-guide/010-preparing-the-environment.md @@ -5,15 +5,17 @@ To build OpenRemote projects, you have to first prepare the environment on your Ensure you have installed and configured the following tools: ## Runtime tooling -OpenRemote is primarily packaged as Docker images and deployed using docker compose, you will need a docker compatible runtime: +OpenRemote is primarily packaged as Docker images and deployed using Docker Compose, you will need a docker compatible runtime: * [Docker](https://docs.docker.com/engine/install/) -* [Docker compose](https://docs.docker.com/compose/install/) +* [Docker Compose](https://docs.docker.com/compose/install/) + +Docker Desktop includes Docker Compose. If you install Docker Engine separately, also install the [Docker Compose plug-in](https://docs.docker.com/compose/install/linux/). Ensure the following commands execute successfully: ```shell docker -v -docker-compose -v +docker compose version ``` ## Development tooling diff --git a/docs/developer-guide/020-setting-up-an-ide.md b/docs/developer-guide/020-setting-up-an-ide.md index a141dd02..9be5fe27 100644 --- a/docs/developer-guide/020-setting-up-an-ide.md +++ b/docs/developer-guide/020-setting-up-an-ide.md @@ -9,13 +9,13 @@ If you have successfully cloned the OpenRemote repo or a custom project repo, yo ### Without SSL and proxy ```shell -docker-compose -p openremote -f profile/dev-testing.yml up --build -d +docker compose -p openremote -f profile/dev-testing.yml up --build -d ``` ### With SSL and proxy ```shell -docker-compose -p openremote -f profile/dev-proxy.yml up --build -d +docker compose -p openremote -f profile/dev-proxy.yml up --build -d ``` ## Importing a project in an IDE diff --git a/docs/developer-guide/030-docker-compose-profiles.md b/docs/developer-guide/030-docker-compose-profiles.md index 438b7965..dc91f230 100644 --- a/docs/developer-guide/030-docker-compose-profiles.md +++ b/docs/developer-guide/030-docker-compose-profiles.md @@ -23,18 +23,18 @@ This is a demo profile which starts all services and provides a quick start for #### Prerequisites Docker images must have been pulled from Docker Hub: ```shell -docker-compose pull +docker compose pull ``` Or the Docker images must have been built locally (requires the full stack be built): ```shell ./gradlew clean installDist -docker-compose build +docker compose build ``` To start the containers: ```shell -docker-compose up -d +docker compose up -d ``` ### UI Development (dev-ui.yml) @@ -43,18 +43,18 @@ This is for doing development work on the UI without having to run the manager i #### Prerequisites Docker images must have been pulled from Docker Hub: ```shell -docker-compose -f profile/dev-ui.yml pull +docker compose -f profile/dev-ui.yml pull ``` Or the docker images must have been built locally (requires the full stack be built): ```shell ./gradlew clean installDist -docker-compose -f profile/dev-ui.yml build +docker compose -f profile/dev-ui.yml build ``` To start the containers: ```shell -docker-compose -f profile/dev-ui.yml up -d +docker compose -f profile/dev-ui.yml up -d ``` #### Exposed Services diff --git a/docs/developer-guide/100-system-administration.md b/docs/developer-guide/100-system-administration.md index 4532f89f..b6ff8ba1 100644 --- a/docs/developer-guide/100-system-administration.md +++ b/docs/developer-guide/100-system-administration.md @@ -131,7 +131,7 @@ This document summarises the database performance, storage footprint, and system Use the following docker command to access the database on the docker host: ```shell -docker exec -it openremote_postgresql_1 psql -U postgres +docker exec -it openremote-postgresql-1 psql -U postgres ``` ### Storage & compression @@ -354,7 +354,7 @@ delete from asset_datapoint where timestamp < now() - INTERVAL '7 days'; #### Accessing the exported CSV file ```shell -docker cp _postgresql_1:/deployment/datapoints.csv ./ +docker cp -postgresql-1:/deployment/datapoints.csv ./ ``` #### Importing asset data points @@ -506,16 +506,16 @@ ssh -L 8404:localhost:8404 ## OpenRemote Manager ### Insert a different manager_config.json file ```shell -docker exec _manager_1 mkdir -p /deployment/manager/app -docker cp ./manager_config.json _manager_1:/deployment/manager/app/manager_config.json +docker exec -manager-1 mkdir -p /deployment/manager/app +docker cp ./manager_config.json -manager-1:/deployment/manager/app/manager_config.json # Make sure to restart the containers for applying the changes ``` ### Insert an .mbtiles file for applying a different map ```shell -docker exec _manager_1 mkdir -p /deployment/map -docker cp ./.mbtiles _manager_1:/deployment/map/mapdata.mbtiles +docker exec -manager-1 mkdir -p /deployment/map +docker cp ./.mbtiles -manager-1:/deployment/map/mapdata.mbtiles # Make sure to restart the containers for applying the changes ``` @@ -530,14 +530,14 @@ docker volume prune -a docker image prune -a ``` -### Restart exited containers (without using `docker-compose up`) +### Restart exited containers (without using `docker compose up`) If the containers are exited then they can be restarted using the `docker` command, the startup order is important: -* docker start `_postgresql_1` -* docker start `_keycloak_1` -* docker start `_map_1` (only if there is a map container) -* docker start `_manager_1` -* docker start `_proxy_1` +* docker start `-postgresql-1` +* docker start `-keycloak-1` +* docker start `-map-1` (only if there is a map container) +* docker start `-manager-1` +* docker start `-proxy-1` ### Using Docker Compose @@ -548,16 +548,16 @@ Service images will be built automatically when they do not exist in the Docker Here are a few useful Docker Compose commands: -* `docker-compose -f pull ...` - Force pull requested services from Docker Hub, if no services specified then all services will be pulled (e.g. docker-compose -f profile/manager.yml pull to pull all services) -* `docker-compose -f build ...` - Build/Rebuild requested services, if no services specified then all services will be built -* `docker-compose -f up ...` - Creates and starts requested services, if no services specified then all services will be created and started (also auto attaches to console output from each service use `-d` to not attach to the console output) -* `docker-compose -f up --build ...` - Creates and starts requested services but also forces building the services first (useful if the source code has changed as docker-compose will not be aware of this change and you would otherwise end up deploying 'stale' services) -* `docker-compose -f down ...` - Stops and removes requested services, if no services specified then all services will be stopped and removed. Sometimes the shutdown doesn't work properly and you have to run `down` again to completely remove all containers and networks. +* `docker compose -f pull ...` - Force pull requested services from Docker Hub, if no services specified then all services will be pulled (e.g. docker compose -f profile/manager.yml pull to pull all services) +* `docker compose -f build ...` - Build/Rebuild requested services, if no services specified then all services will be built +* `docker compose -f up ...` - Creates and starts requested services, if no services specified then all services will be created and started (also auto attaches to console output from each service use `-d` to not attach to the console output) +* `docker compose -f up --build ...` - Creates and starts requested services but also forces building the services first (useful if the source code has changed as Docker Compose will not be aware of this change and you would otherwise end up deploying 'stale' services) +* `docker compose -f down ...` - Stops and removes requested services, if no services specified then all services will be stopped and removed. Sometimes the shutdown doesn't work properly and you have to run `down` again to completely remove all containers and networks. * When deploying profiles you can provide a project name to prefix the container names (by default Docker Compose will use the configuration profile's folder name); the project name can be specified with the -p argument using the CLI: ```shell -docker-compose -p -f -f up -d ... +docker compose -p -f -f up -d ... ``` diff --git a/docs/developer-guide/110-working-on-ui-and-apps.md b/docs/developer-guide/110-working-on-ui-and-apps.md index 42b93a70..9c602a79 100644 --- a/docs/developer-guide/110-working-on-ui-and-apps.md +++ b/docs/developer-guide/110-working-on-ui-and-apps.md @@ -7,7 +7,7 @@ Front end applications are [webcomponent](https://www.webcomponents.org/) based To work on an app for example the `Manager UI` : - From the main directory, start the required containers, use dev-ui.yml for example: ```shell - docker-compose -f profile/dev-ui.yml up -d + docker compose -f profile/dev-ui.yml up -d ``` By default, this makes the manager container serve the apps present in the latest docker image on port 8080 e.g. `http://localhost:8080/manager/` . While these apps are not necessary for this case, the included manager container webservice is. diff --git a/docs/developer-guide/150-create-docker-machine-on-aws-ec2.md b/docs/developer-guide/150-create-docker-machine-on-aws-ec2.md index bf3f4594..4aa5f470 100644 --- a/docs/developer-guide/150-create-docker-machine-on-aws-ec2.md +++ b/docs/developer-guide/150-create-docker-machine-on-aws-ec2.md @@ -42,19 +42,19 @@ services: #### Fetch OpenVPN Docker image ```shell -docker-compose run --rm openvpn ovpn_genconfig -u udp://aws +docker compose run --rm openvpn ovpn_genconfig -u udp://aws ``` #### Generate certificates ```shell -docker-compose run --rm openvpn ovpn_initpki +docker compose run --rm openvpn ovpn_initpki ``` #### Start OpenVPN container ```shell -$ docker-compose up -d openvpn +$ docker compose up -d openvpn $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 09934f3f52b2 kylemanna/openvpn "ovpn_run" 6 seconds ago Up 4 seconds 0.0.0.0:1194->1194/udp openvpn @@ -63,13 +63,13 @@ CONTAINER ID IMAGE COMMAND CREATED #### Generate certificate for a client ```shell -docker-compose run --rm openvpn easyrsa build-client-full client nopass +docker compose run --rm openvpn easyrsa build-client-full client nopass ``` #### Get config to local machine ```shell -docker-compose run --rm openvpn ovpn_getclient client > aws.ovpn +docker compose run --rm openvpn ovpn_getclient client > aws.ovpn ``` #### Import config to your OpenVPN client (Tunnelblick on Mac) diff --git a/docs/tutorials/040-receive-lorawan-sensor-data-from-chirpstack.md b/docs/tutorials/040-receive-lorawan-sensor-data-from-chirpstack.md index 290ef639..42f4f692 100644 --- a/docs/tutorials/040-receive-lorawan-sensor-data-from-chirpstack.md +++ b/docs/tutorials/040-receive-lorawan-sensor-data-from-chirpstack.md @@ -18,7 +18,7 @@ cd chirpstack-docker ``` 2. Start ChirpStack ```shell -docker-compose up +docker compose up ``` 3. Login to the ChirpStack UI (`http://localhost:8080/` `admin/admin`) ## Create the ChirpStack LoRaWAN Gateway diff --git a/docs/user-guide/010-deploying/10-custom-deployment.md b/docs/user-guide/010-deploying/10-custom-deployment.md index 9f8887c0..d1e36e20 100644 --- a/docs/user-guide/010-deploying/10-custom-deployment.md +++ b/docs/user-guide/010-deploying/10-custom-deployment.md @@ -11,7 +11,7 @@ In this guide we will go through the first time setting up your [custom project] 2. Clone your repository from the [custom-project template](https://github.com/openremote/custom-project).\ This is easiest if you have an [SSH-key in your GitHub account](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) 3. [Set up your IDE](../../developer-guide/020-setting-up-an-ide.md). Note that Application run configurations are already prepared when using this template. \ -Use `docker-compose -f profile\dev-testing.yml up --build -d` and run the 'Custom Deployment' configuration. You should have two containers running in Docker, and the manager through your IDE. +Use `docker compose -f profile\dev-testing.yml up --build -d` and run the 'Custom Deployment' configuration. You should have two containers running in Docker, and the manager through your IDE. 4. Run the modelWatch gradle task to build the typescript model `./gradlew modelWatch` 5. Next we serve the Manager UI from the `/openremote/ui/app/manager` directory with `npm run serve "--" --env config=..\..\..\..\deployment\manager\app`. diff --git a/docs/user-guide/010-deploying/70-balena-deployment.md b/docs/user-guide/010-deploying/70-balena-deployment.md index 62bf86fa..d553a97c 100644 --- a/docs/user-guide/010-deploying/70-balena-deployment.md +++ b/docs/user-guide/010-deploying/70-balena-deployment.md @@ -45,7 +45,7 @@ administrator from the CLI/from the BalenaCloud dashboard. To create a new release, you can push this directory to the fleet using the included shell file in `balena/run_balena_build.sh`. ## Parameters: -* `--dry-run`: This flag enables the dry-run mode. When this mode is enabled, the script will build the Docker images and bring up the containers locally using docker-compose instead of pushing to the Balena fleet. +* `--dry-run`: This flag enables the dry-run mode. When this mode is enabled, the script will build the Docker images and bring up the containers locally using `docker compose` instead of pushing to the Balena fleet. * `--skip-build`: This flag skips the build process. When enabled, the script will not remove the existing manager-build directory or rebuild the project. * ``: This is a required argument specifying the Balena fleet slug to which the application will be pushed. @@ -63,7 +63,7 @@ To create a new release, you can push this directory to the fleet using the incl * It then returns to the balena directory. * Copy New Builds: If the manager-build directory does not exist, the script copies the new build files from Gradle's build output to ./manager-build. * Push to Balena or Run Docker Compose: - * If DRY_RUN is true, the script builds the Docker images without using the cache and starts the containers locally using docker-compose with the --force-recreate option. + * If DRY_RUN is true, the script builds the Docker images without using the cache and starts the containers locally using `docker compose` with the --force-recreate option. * If DRY_RUN is false, the script pushes the application to the specified Balena fleet using the balena push command with the --nocache option. # Quirks you should be aware of @@ -71,14 +71,14 @@ To create a new release, you can push this directory to the fleet using the incl In general, Balena CLI/Balena API/BalenaCloud do things their own way. Some examples: * You cannot set a `docker-compose.yml` file to be used specifically for balena, it NEEDS to use `docker-compose.yml`. -* `balena push` **does not** build the image locally. All folders/files referenced in the Dockerfiles/docker-compose +* `balena push` **does not** build the image locally. All folders/files referenced in the Dockerfiles or Docker Compose files are uploaded to their own builder platform and are built on their premises. This is done to allow building the images in all of the different architectures that you might use the release in. * You cannot use environment variables in the way you usually do. Using default/error values in environment variables does not work. * For the above point, the concept of environment variables in a `docker-compose.yml` file doesn't quite exist; environment variables in Balena environments are set using the CLI or the dashboard, and there are fleet-level and - device-level variables. You would set an environment variable in the docker-compose file specifically when it's an + device-level variables. You would set an environment variable in the Docker Compose file specifically when it's an environment variable that applies for ALL devices that may run this in BalenaOS (or for debugging locally of course). All environment variables of a device/fleet are included in ALL services. So `OR_MAIN_THREAD_WAIT_MS` WILL end up on the proxy container, and Keycloak, and the manager, etc. diff --git "a/docs/user-guide/040-agents-protocols/210-disabled-protocols/20-ikea-tr\303\245dfri-agent.md" "b/docs/user-guide/040-agents-protocols/210-disabled-protocols/20-ikea-tr\303\245dfri-agent.md" index 7139be28..0a175b96 100644 --- "a/docs/user-guide/040-agents-protocols/210-disabled-protocols/20-ikea-tr\303\245dfri-agent.md" +++ "b/docs/user-guide/040-agents-protocols/210-disabled-protocols/20-ikea-tr\303\245dfri-agent.md" @@ -10,7 +10,7 @@ You can connect an IKEA TRÅDFRI Gateway to the manager. The manager will import ## Docker configuration -If you are using Docker (and docker-compose) to run OpenRemote, you need to change the configuration of docker-compose in order to use the IKEA TRÅDFRI protocol. +If you are using Docker Compose to run OpenRemote, you need to change the Docker Compose configuration in order to use the IKEA TRÅDFRI protocol. In the `profile/deploy.yml` file, uncomment the lines below the following line: "# Uncomment to support the IKEA TRÅDFRI protocol. USE AT YOUR OWN RISK.". This line occurs 6 times in the `profile/deploy.yml` file. Make sure to find all of them.