diff --git a/apps/api/.dev.env b/apps/api/.dev.env new file mode 100644 index 0000000..8d9721d --- /dev/null +++ b/apps/api/.dev.env @@ -0,0 +1,9 @@ +PORT=4000 +NODE_ENV='development' +SWAP_GRPC_URL='swap:4040' +NOSTR_GRPC_URL='nostr:4050' +SMS_GRPC_URL='sms:4060' +SHARES_GRPC_URL='shares:4070' +SOLOWALLET_GRPC_URL='solowallet:4080' +REDIS_HOST='redis' +REDIS_PORT=6379 diff --git a/apps/api/.env.manual b/apps/api/.env.manual deleted file mode 100644 index 6b16b17..0000000 --- a/apps/api/.env.manual +++ /dev/null @@ -1,8 +0,0 @@ -PORT=4000 -NODE_ENV='development' -SWAP_GRPC_URL='0.0.0.0:4040' -NOSTR_GRPC_URL='0.0.0.0:4050' -SMS_GRPC_URL='0.0.0.0:4060' -SHARES_GRPC_URL='0.0.0.0:4070' -REDIS_HOST='0.0.0.0' -REDIS_PORT=6379 \ No newline at end of file diff --git a/apps/nostr/.dev.env b/apps/nostr/.dev.env new file mode 100644 index 0000000..a9d3e2a --- /dev/null +++ b/apps/nostr/.dev.env @@ -0,0 +1,4 @@ +NODE_ENV='development' +NOSTR_GRPC_URL='nostr:4050' +NOSTR_PUBLIC_KEY=ce79848d6bd7cb0d7cfa18a81dc5f46459f5b7404d2489d0b60aa4069ff48dcb +NOSTR_PRIVATE_KEY=nsec1tlqwv9dupsn4d54zzagw66tp924uwgfr6cgzphv5atq8m66a63fq86hmr0 diff --git a/apps/shares/.dev.env b/apps/shares/.dev.env new file mode 100644 index 0000000..90ab10f --- /dev/null +++ b/apps/shares/.dev.env @@ -0,0 +1,4 @@ +NODE_ENV='development' +SHARES_GRPC_URL='shares:4070' +SHARES_ISSUED='10000' +DATABASE_URL=mongodb://bs:password@mongodb:27017 diff --git a/apps/shares/.env.manual b/apps/shares/.env.manual deleted file mode 100644 index 6a26894..0000000 --- a/apps/shares/.env.manual +++ /dev/null @@ -1,4 +0,0 @@ -NODE_ENV='development' -SHARES_GRPC_URL='0.0.0.0:4070' -SHARES_ISSUED='10000' -DATABASE_URL=mongodb://bs:password@0.0.0.0:27017 diff --git a/apps/sms/.env.manual b/apps/sms/.dev.env similarity index 86% rename from apps/sms/.env.manual rename to apps/sms/.dev.env index 7c5ff92..7778a17 100644 --- a/apps/sms/.env.manual +++ b/apps/sms/.dev.env @@ -1,5 +1,5 @@ NODE_ENV='development' -SMS_GRPC_URL='0.0.0.0:4060' +SMS_GRPC_URL='sms:4060' SMS_AT_API_KEY=5630171cd8c1a35ef67b07bbf1697feaad1a32d891cce6712271bf8c2815beea SMS_AT_USERNAME=sandbox SMS_AT_FROM='21000' diff --git a/apps/solowallet/.env.manual b/apps/solowallet/.dev.env similarity index 58% rename from apps/solowallet/.env.manual rename to apps/solowallet/.dev.env index 9feb100..116f68f 100644 --- a/apps/solowallet/.env.manual +++ b/apps/solowallet/.dev.env @@ -1,8 +1,8 @@ NODE_ENV='development' -SOLOWALLET_GRPC_URL='0.0.0.0:4080' -SWAP_GRPC_URL='0.0.0.0:4040' -DATABASE_URL=mongodb://bs:password@0.0.0.0:27017 -FEDIMINT_CLIENTD_BASE_URL=http://swap-clientd:7070 +SOLOWALLET_GRPC_URL='solowallet:4080' +SWAP_GRPC_URL='swap:4040' +DATABASE_URL=mongodb://bs:password@mongodb:27017 +FEDIMINT_CLIENTD_BASE_URL=http://clientd:7070 FEDIMINT_CLIENTD_PASSWORD=fmcdpass FEDIMINT_FEDERATION_ID=596ab5a5456376f925d145a2ef038cc5a70b99be7d2d0eb30feca5e849ecd351 FEDIMINT_GATEWAY_ID=03187672262e17300f4822bb64c18ef74a266ebe1780631543b188537f9cf4a904 diff --git a/apps/swap/.env.manual b/apps/swap/.dev.env similarity index 76% rename from apps/swap/.env.manual rename to apps/swap/.dev.env index 4dd7da8..ac5f42c 100644 --- a/apps/swap/.env.manual +++ b/apps/swap/.dev.env @@ -1,13 +1,13 @@ NODE_ENV='development' -SWAP_GRPC_URL='0.0.0.0:4040' -REDIS_HOST='0.0.0.0' +SWAP_GRPC_URL='swap:4040' +REDIS_HOST='redis' REDIS_PORT='6379' MOCK_BTC_KES_RATE='8708520.117232416' # CURRENCY_API_KEY='foo-bar-baz' -DATABASE_URL=mongodb://bs:password@0.0.0.0:27017 +DATABASE_URL=mongodb://bs:password@mongodb:27017 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_BASE_URL=http://clientd:7070 FEDIMINT_CLIENTD_PASSWORD=fmcdpass FEDIMINT_FEDERATION_ID=596ab5a5456376f925d145a2ef038cc5a70b99be7d2d0eb30feca5e849ecd351 FEDIMINT_GATEWAY_ID=03187672262e17300f4822bb64c18ef74a266ebe1780631543b188537f9cf4a904 diff --git a/compose.yml b/compose.yml index 069c3bd..316b25c 100644 --- a/compose.yml +++ b/compose.yml @@ -10,7 +10,7 @@ services: depends_on: - mongodb env_file: - - ./apps/api/.env + - ./apps/api/.dev.env ports: - '4000:4000' volumes: @@ -28,11 +28,11 @@ services: ] restart: always depends_on: - - swap-clientd + - clientd - mongodb - redis env_file: - - ./apps/swap/.env + - ./apps/swap/.dev.env ports: - '4040:4040' volumes: @@ -54,7 +54,7 @@ services: - mongodb - redis env_file: - - ./apps/nostr/.env + - ./apps/nostr/.dev.env ports: - '4050:4050' volumes: @@ -76,7 +76,7 @@ services: - mongodb - redis env_file: - - ./apps/sms/.env + - ./apps/sms/.dev.env ports: - '4060:4060' volumes: @@ -98,7 +98,7 @@ services: - mongodb - redis env_file: - - ./apps/shares/.env + - ./apps/shares/.dev.env ports: - '4070:4070' volumes: @@ -121,7 +121,7 @@ services: - mongodb - redis env_file: - - ./apps/solowallet/.env + - ./apps/solowallet/.dev.env ports: - '4080:4080' volumes: @@ -145,20 +145,22 @@ services: ports: - '6379:6379' restart: always - swap-clientd: + + clientd: image: okjodom/fedimint-clientd:v0.4.0 - container_name: swap-clientd + container_name: clientd environment: - FEDIMINT_CLIENTD_DB_PATH=/var/lib/clientd - FEDIMINT_CLIENTD_PASSWORD=fmcdpass - - FEDIMINT_CLIENTD_ADDR=0.0.0.0:7070 + - FEDIMINT_CLIENTD_ADDR=clientd:7070 - FEDIMINT_CLIENTD_MODE=rest - FEDIMINT_CLIENTD_INVITE_CODE=fed11qgqrwdthwden5te0v9cxjttndakk2ttrdpjk2um994erx7rsx568vur9dy68z6pnvd6xg63hwsh8wmn90p6zuctswqhsqqfqt94ttf29vdm0jfw3gk3w7quvcknshxd705ksavc0ajj7sj0v6dgsxcydnc ports: - - 0.0.0.0:7070:7070 + - 7070:7070 volumes: - swap_clientd_datadir:/var/lib/clientd restart: always + volumes: mongodb_datadir: swap_clientd_datadir: diff --git a/scripts/api.manual.dev.sh b/scripts/api.manual.dev.sh deleted file mode 100755 index 3f47fbe..0000000 --- a/scripts/api.manual.dev.sh +++ /dev/null @@ -1,3 +0,0 @@ - -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/shares.manual.dev.sh b/scripts/shares.manual.dev.sh deleted file mode 100755 index b42b74c..0000000 --- a/scripts/shares.manual.dev.sh +++ /dev/null @@ -1,3 +0,0 @@ - -docker compose -f compose.yml -p os up -d postgres redis -bunx dotenv -e apps/shares/.env.manual bun run dev shares -- --trace-deprecation diff --git a/scripts/sms.manual.dev.sh b/scripts/sms.manual.dev.sh deleted file mode 100755 index 1b0993b..0000000 --- a/scripts/sms.manual.dev.sh +++ /dev/null @@ -1,3 +0,0 @@ - -# docker compose -f compose.yml -p os up -d postgres redis -bunx dotenv -e apps/sms/.env.manual bun run dev sms -- --trace-deprecation \ No newline at end of file diff --git a/scripts/swap.manual.dev.sh b/scripts/swap.manual.dev.sh deleted file mode 100755 index 0cdf6a2..0000000 --- a/scripts/swap.manual.dev.sh +++ /dev/null @@ -1,3 +0,0 @@ - -docker compose -f compose.yml -p os up -d postgres redis swap-clientd -bunx dotenv -e apps/swap/.env.manual bun run dev swap -- --trace-deprecation