From 81b07d5d374474d2f632a201f2b35ceb95b2fff7 Mon Sep 17 00:00:00 2001 From: okjodom Date: Sun, 3 Nov 2024 20:47:08 +0300 Subject: [PATCH] feat: setup manual developer scripts - to manually start api or swap services, you only need run - ./scripts/api.manual.dev.sh - ./scripts/swap.manual.dev.sh - either of these scripts will run the services dependend upon, before spinning up in dev mode --- apps/api/.env.manual | 5 +++++ apps/swap/.env.manual | 13 +++++++++++++ compose.yml | 1 - scripts/api.manual.dev.sh | 3 +++ scripts/swap.manual.dev.sh | 3 +++ 5 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 apps/api/.env.manual create mode 100644 apps/swap/.env.manual create mode 100755 scripts/api.manual.dev.sh create mode 100755 scripts/swap.manual.dev.sh diff --git a/apps/api/.env.manual b/apps/api/.env.manual new file mode 100644 index 0000000..1e44efb --- /dev/null +++ b/apps/api/.env.manual @@ -0,0 +1,5 @@ +PORT=4000 +NODE_ENV='development' +SWAP_GRPC_URL='0.0.0.0:4040' +REDIS_HOST='0.0.0.0' +REDIS_PORT=6379 \ No newline at end of file diff --git a/apps/swap/.env.manual b/apps/swap/.env.manual new file mode 100644 index 0000000..8a981b8 --- /dev/null +++ b/apps/swap/.env.manual @@ -0,0 +1,13 @@ +NODE_ENV='development' +SWAP_GRPC_URL='0.0.0.0:4040' +REDIS_HOST='0.0.0.0' +REDIS_PORT='6379' +MOCK_BTC_KES_RATE='8708520.117232416' +# CURRENCY_API_KEY='foo-bar-baz' +DATABASE_URL=postgresql://bs:password@0.0.0.0:5432/swap +INTASEND_PUBLIC_KEY=ISPubKey_test_925ab885-f06d-4ace-8507-4186413a59a4 +INTASEND_PRIVATE_KEY=ISSecretKey_test_3d887e44-33c4-4455-978e-d2ae7b10907d +FEDIMINT_CLIENTD_BASE_URL=http://0.0.0.0:7070 +FEDIMINT_CLIENTD_PASSWORD=fmcdpass +FEDIMINT_FEDERATION_ID=596ab5a5456376f925d145a2ef038cc5a70b99be7d2d0eb30feca5e849ecd351 +FEDIMINT_GATEWAY_ID=03187672262e17300f4822bb64c18ef74a266ebe1780631543b188537f9cf4a904 diff --git a/compose.yml b/compose.yml index 5a3b5e0..b8b48ed 100644 --- a/compose.yml +++ b/compose.yml @@ -10,7 +10,6 @@ services: restart: always depends_on: - postgres - - swap env_file: - ./apps/api/.env ports: diff --git a/scripts/api.manual.dev.sh b/scripts/api.manual.dev.sh new file mode 100755 index 0000000..3f47fbe --- /dev/null +++ b/scripts/api.manual.dev.sh @@ -0,0 +1,3 @@ + +docker compose -f compose.yml -p os up -d postgres redis swap-clientd +bunx dotenv -e apps/api/.env.manual bun run dev api -- --trace-deprecation diff --git a/scripts/swap.manual.dev.sh b/scripts/swap.manual.dev.sh new file mode 100755 index 0000000..fae4122 --- /dev/null +++ b/scripts/swap.manual.dev.sh @@ -0,0 +1,3 @@ + +docker compose -f compose.yml -p os up -d api postgres redis swap-clientd +bunx dotenv -e apps/swap/.env.manual bun run dev swap -- --trace-deprecation