mirror of
https://github.com/absmach/supermq.git
synced 2026-06-23 06:40:19 +00:00
NOISSUE - Improve running different versions
Signed-off-by: dusan <borovcanindusan1@gmail.com>
This commit is contained in:
@@ -97,7 +97,7 @@ FILTERED_SERVICES = $(filter-out $(RUN_ADDON_ARGS), $(SERVICES))
|
||||
|
||||
all: $(SERVICES)
|
||||
|
||||
.PHONY: all $(SERVICES) dockers dockers_dev latest release run run_addons grpc_mtls_certs check_mtls check_certs test_api mocks
|
||||
.PHONY: all $(SERVICES) dockers dockers_dev latest release run_latest run_stable run_addons grpc_mtls_certs check_mtls check_certs test_api mocks
|
||||
|
||||
clean:
|
||||
rm -rf ${BUILD_DIR}
|
||||
@@ -259,12 +259,24 @@ endif
|
||||
fetch_supermq:
|
||||
@./scripts/supermq.sh
|
||||
|
||||
run: check_certs
|
||||
run_latest: check_certs
|
||||
MG_ADDONS_CERTS_PATH_PREFIX="../." docker compose -f docker/docker-compose.yaml \
|
||||
-f docker/addons/timescale-reader/docker-compose.yaml \
|
||||
-f docker/addons/timescale-writer/docker-compose.yaml \
|
||||
--env-file docker/.env -p $(DOCKER_PROJECT) $(DOCKER_COMPOSE_COMMAND) $(args)
|
||||
|
||||
run_stable: check_certs
|
||||
$(eval version = $(shell git describe --abbrev=0 --tags))
|
||||
git checkout $(version)
|
||||
sed -i 's/^SMQ_RELEASE_TAG=.*/SMQ_RELEASE_TAG=$(version)/' docker/supermq-docker/.env
|
||||
sed -i 's/^MG_RELEASE_TAG=.*/MG_RELEASE_TAG=$(version)/' docker/.env
|
||||
docker compose -f docker/docker-compose.yaml --env-file docker/.env -p $(DOCKER_PROJECT) $(DOCKER_COMPOSE_COMMAND) $(args)
|
||||
MG_ADDONS_CERTS_PATH_PREFIX="../." docker compose -f docker/docker-compose.yaml \
|
||||
-f docker/addons/timescale-reader/docker-compose.yaml \
|
||||
-f docker/addons/timescale-writer/docker-compose.yaml \
|
||||
--env-file docker/.env -p $(DOCKER_PROJECT) $(DOCKER_COMPOSE_COMMAND) $(args)
|
||||
|
||||
|
||||
run_addons: check_certs
|
||||
$(foreach SVC,$(RUN_ADDON_ARGS),$(if $(filter $(SVC),$(ADDON_SERVICES) $(EXTERNAL_SERVICES)),,$(error Invalid Service $(SVC))))
|
||||
@for SVC in $(RUN_ADDON_ARGS); do \
|
||||
|
||||
@@ -53,22 +53,42 @@ Magistrala is a cutting-edge, open-source IoT cloud platform built on top of [Su
|
||||
- 🏗️ **Domain-Driven Design**: High-quality codebase and extensive test coverage.
|
||||
|
||||
|
||||
## 🔧 Install
|
||||
## Installation 🛠️
|
||||
|
||||
Clone the repository and start the services:
|
||||
There are multiple ways to run Magistrala.
|
||||
First, clone the repository and position to it:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/absmach/magistrala.git
|
||||
cd magistrala
|
||||
docker compose -f docker/docker-compose.yaml --env-file docker/.env up
|
||||
```
|
||||
|
||||
Alternatively, use the Makefile for a simpler command:
|
||||
To run the latest stable (tagged) version, use:
|
||||
|
||||
```bash
|
||||
make run args=-d
|
||||
# Run with latest stable tagged version
|
||||
make run_stable
|
||||
```
|
||||
|
||||
To run the latest version, use:
|
||||
|
||||
```bash
|
||||
# Run with latest development version (from main branch)
|
||||
make run_latest
|
||||
```
|
||||
|
||||
The `make run_stable` command will:
|
||||
- Checkout the repository to the latest git tag
|
||||
- Update the version in the environment configuration
|
||||
- Start the services with the stable release
|
||||
|
||||
**Note:** After running `make run_stable`, you'll be on a detached HEAD state. To return to your working branch:
|
||||
|
||||
```bash
|
||||
git checkout main
|
||||
```
|
||||
|
||||
|
||||
## 📤 Usage
|
||||
|
||||
#### Using the CLI:
|
||||
|
||||
Reference in New Issue
Block a user