You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by tn...@apache.org on 2025/04/03 20:53:42 UTC

(tooling-trusted-release) branch main updated: add run-dev and run-staging targets, pass BIND env variable to run script

This is an automated email from the ASF dual-hosted git repository.

tn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git


The following commit(s) were added to refs/heads/main by this push:
     new 47e08ab  add run-dev and run-staging targets, pass BIND env variable to run script
47e08ab is described below

commit 47e08ab25335dedb08ee22c42f35a08015a50e06
Author: Thomas Neidhart <tn...@apache.org>
AuthorDate: Thu Apr 3 22:53:34 2025 +0200

    add run-dev and run-staging targets, pass BIND env variable to run script
---
 Makefile    | 11 ++++++++---
 scripts/run |  4 +++-
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index ac0e0f8..c92e1f1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-.PHONY: build build-alpine build-ubuntu certs check docs generate-version obvfix report run stop serve sync sync-dev
+.PHONY: build build-alpine build-ubuntu certs check docs generate-version obvfix report run run-dev run-staging stop serve sync sync-dev
 
 BIND ?= 127.0.0.1:8080
 IMAGE ?= tooling-trusted-release
@@ -44,8 +44,13 @@ obvfix:
 report:
 	@echo SCRIPTS = $(SCRIPTS)
 
-run:
-	scripts/run
+run: run-dev
+
+run-dev:
+	BIND=127.0.0.1:8080 scripts/run
+
+run-staging:
+	BIND=127.0.0.1:8081 scripts/run
 
 serve:
 	SSH_HOST=127.0.0.1 $(SCRIPTS)/run hypercorn --bind $(BIND) \
diff --git a/scripts/run b/scripts/run
index a67ea08..59762c3 100755
--- a/scripts/run
+++ b/scripts/run
@@ -7,4 +7,6 @@ else
   MOUNT="./state"
 fi
 
-docker run --rm -d -v "${MOUNT}:/opt/atr/state" --network host --name tooling-trusted-release tooling-trusted-release
+BIND="${BIND:=127.0.0.1:8080}"
+
+docker run --rm -d -v "${MOUNT}:/opt/atr/state" -e BIND="${BIND}" --network host --name tooling-trusted-release tooling-trusted-release


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org