Fix runs commands on docker compose (internal)

main 1.3.3
Paulo Truta 2025-10-05 20:24:02 +02:00
parent dbc831e972
commit 7996c552f8
3 changed files with 10 additions and 8 deletions

View File

@ -67,7 +67,7 @@ run:
install: install:
@echo "📦 Installing edgeboxctl service (${RELEASE}) for ${GOOS} (${GOARCH})\n" @echo "📦 Installing edgeboxctl service (${RELEASE}) for ${GOOS} (${GOARCH})\n"
@echo "🚧 Stopping edgeboxctl service if it is running" @echo "<EFBFBD>🚧 Stopping edgeboxctl service if it is running"
sudo systemctl stop edgeboxctl || true sudo systemctl stop edgeboxctl || true
@echo "\n🗑 Removing old edgeboxctl binary and service" @echo "\n🗑 Removing old edgeboxctl binary and service"

View File

@ -59,10 +59,12 @@ To get a local copy up and running follow these simple steps.
If you're running for development purposes, a docker container suffices, so make sure you have: If you're running for development purposes, a docker container suffices, so make sure you have:
* docker * docker
* docker compose * docker compose (docker-compose-v2 package)
Check the following links for more info on [Docker](https://www.docker.com/) and [Docker Compose](https://docs.docker.com/compose/). Check the following links for more info on [Docker](https://www.docker.com/) and [Docker Compose](https://docs.docker.com/compose/).
**Note:** If you don't have `docker compose` available, install it with: `sudo apt-get install docker-compose-v2`
Aditionally, `edgeboxctl` needs the following bash commands available wherever it runs: Aditionally, `edgeboxctl` needs the following bash commands available wherever it runs:
* `arm-linux-gnueabi-gcc` (`sudo apt-get install gcc-arm*`) * `arm-linux-gnueabi-gcc` (`sudo apt-get install gcc-arm*`)
@ -79,10 +81,10 @@ Aditionally, `edgeboxctl` needs the following bash commands available wherever i
```sh ```sh
git clone https://github.com/edgebox-iot/edgeboxctl.git git clone https://github.com/edgebox-iot/edgeboxctl.git
``` ```
2. Run Docker-Compose 2. Run Docker Compose
```sh
docker-compose up
``` ```
docker compose up

View File

@ -489,7 +489,7 @@ func GetEdgeAppServices(ID string) []EdgeAppService {
// Check if the service is actually running // Check if the service is actually running
if shouldBeRunning { if shouldBeRunning {
cmdArgs = []string{"-f", wsPath + "/docker-compose.yml", "exec", "-T", serviceID, "echo", "'Service Check'"} cmdArgs = []string{"-f", wsPath + "/docker-compose.yml", "exec", "-T", serviceID, "echo", "'Service Check'"}
cmdResult := utils.Exec(wsPath, "docker-compose", cmdArgs) cmdResult := utils.Exec(wsPath, "docker", append([]string{"compose"}, cmdArgs...))
if cmdResult != "" { if cmdResult != "" {
isRunning = true isRunning = true
} }
@ -511,7 +511,7 @@ func RunEdgeApp(ID string) EdgeAppStatus {
for _, service := range services { for _, service := range services {
cmdArgs = []string{"-f", wsPath + "/docker-compose.yml", "start", service.ID} cmdArgs = []string{"-f", wsPath + "/docker-compose.yml", "start", service.ID}
utils.Exec(wsPath, "docker-compose", cmdArgs) utils.Exec(wsPath, "docker", append([]string{"compose"}, cmdArgs...))
} }
// Wait for it to settle up before continuing... // Wait for it to settle up before continuing...
@ -529,7 +529,7 @@ func StopEdgeApp(ID string) EdgeAppStatus {
for _, service := range services { for _, service := range services {
cmdArgs = []string{"-f", wsPath + "/docker-compose.yml", "stop", service.ID} cmdArgs = []string{"-f", wsPath + "/docker-compose.yml", "stop", service.ID}
utils.Exec(wsPath, "docker-compose", cmdArgs) utils.Exec(wsPath, "docker", append([]string{"compose"}, cmdArgs...))
} }
// Wait for it to settle up before continuing... // Wait for it to settle up before continuing...