From 559dd316f145f6491342d66a70f73047cd035ea3 Mon Sep 17 00:00:00 2001 From: hsinhoyeh Date: Thu, 24 Oct 2024 11:42:56 +0800 Subject: [PATCH] feat: add launch scripts --- run_local.sh | 13 +++++++++++++ run_postgres.sh | 8 ++++++++ 2 files changed, 21 insertions(+) create mode 100755 run_local.sh create mode 100755 run_postgres.sh diff --git a/run_local.sh b/run_local.sh new file mode 100755 index 0000000..c04e309 --- /dev/null +++ b/run_local.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# +go build -o restcol && \ + ./restcol --restcol_auto_migrate \ + --restcol_db_endpoint=localhost:5432 \ + --restcol_db_name=unittest \ + --restcol_db_user=postgres \ + --restcol_db_password=password + + +# open default project url +# open http://localhost:50091/v1/projects/1001/apidoc +# open swaggerui http://localhost:50091/swaggerui/ diff --git a/run_postgres.sh b/run_postgres.sh new file mode 100755 index 0000000..20d69b6 --- /dev/null +++ b/run_postgres.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +docker run --rm --name postgres \ + -e TZ=gmt+8 \ + -e POSTGRES_USER=postgres \ + -e POSTGRES_PASSWORD=password \ + -e POSTGRES_DB=unittest \ + -p 5432:5432 -d library/postgres:16-alpine3.18