Skip to content

Commit 03bfdec

Browse files
authored
Merge pull request #21 from Libertech-FR/tacxou-patch-3
Update Makefile
2 parents f203c85 + 2f8f152 commit 03bfdec

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Makefile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
include .env
22
APP_PORT = 4002
33
IMG_NAME = "ghcr.io/libertech-fr/sesame-orchestrator"
4+
BASE_NAME = "sesame"
45
APP_NAME = "sesame-orchestrator"
56
PLATFORM = "linux/amd64"
67

@@ -46,10 +47,10 @@ exec: ## Run a shell in the container
4647
$(IMG_NAME) sh
4748

4849
dbs: ## Start databases
49-
@docker volume create $(APP_NAME)-mongodb
50+
@docker volume create $(BASE_NAME)-mongodb
5051
@docker run -d --rm \
51-
--name $(APP_NAME)-mongodb \
52-
-v $(APP_NAME)-mongodb:/data/db \
52+
--name $(BASE_NAME)-mongodb \
53+
-v $(BASE_NAME)-mongodb:/data/db \
5354
-p 27017:27017 \
5455
-e MONGODB_REPLICA_SET_MODE=primary \
5556
-e MONGODB_REPLICA_SET_NAME=rs0 \
@@ -64,8 +65,8 @@ dbs: ## Start databases
6465
mongo:7.0 --replSet rs0 --wiredTigerCacheSizeGB 1.5 || true
6566
@docker volume create $(APP_NAME)-redis
6667
@docker run -d --rm \
67-
--name $(APP_NAME)-redis \
68-
-v $(APP_NAME)-redis:/data \
68+
--name $(BASE_NAME)-redis \
69+
-v $(BASE_NAME)-redis:/data \
6970
--platform $(PLATFORM) \
7071
--network dev \
7172
-p 6379:6379 \
@@ -75,12 +76,12 @@ dbs: ## Start databases
7576
--health-retries=3 \
7677
--health-cmd="redis-cli ping || exit 1" \
7778
redis || true
78-
@docker exec -it $(APP_NAME)-mongodb mongo --eval "rs.initiate({_id: 'rs0', members: [{_id: 0, host: '127.0.0.1:27017'}]})" || true
79+
@docker exec -it $(BASE_NAME)-mongodb mongo --eval "rs.initiate({_id: 'rs0', members: [{_id: 0, host: '127.0.0.1:27017'}]})" || true
7980

8081
stop: ## Stop the container
8182
@docker stop $(APP_NAME) || true
82-
@docker stop $(APP_NAME)-mongodb || true
83-
@docker stop $(APP_NAME)-redis || true
83+
@docker stop $(BASE_NAME)-mongodb || true
84+
@docker stop $(BASE_NAME)-redis || true
8485

8586
run-test: ## Run tests
8687
act --container-architecture="linux/arm64" -j test

0 commit comments

Comments
 (0)