diff options
| author | Adam Soltys <[email protected]> | 2022-12-20 20:26:01 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-12-20 20:26:02 +0000 |
| commit | aecec231b6d94b0707b840a7153bd05a057f49c7 (patch) | |
| tree | a92ae610c5c2094d4e500bca52b812fb17600d84 | |
| parent | 9ebd4105fa412d16bfe58facc9ebb53847b3316a (diff) | |
| download | coinos-server-aecec231b6d94b0707b840a7153bd05a057f49c7.tar.gz coinos-server-aecec231b6d94b0707b840a7153bd05a057f49c7.zip | |
nip5
| -rw-r--r-- | index.js | 6 | ||||
| -rw-r--r-- | lib/send.js | 2 | ||||
| -rw-r--r-- | reg.yml | 96 |
3 files changed, 103 insertions, 1 deletions
@@ -40,6 +40,12 @@ app.post('/echo', optionalAuth, async (req, res) => { res.send(req.body); }); +app.get('/nostr.json', async (req, res) => { + res.send({ + names: { adam: "566c166f3adab0c8fba5da015b0b3bcc8eb3696b455f2a1d43bfbd97059646a8", asoltys: "566c166f3adab0c8fba5da015b0b3bcc8eb3696b455f2a1d43bfbd97059646a8" } + }); +}); + app.listen({ host, port }, (e, address) => { e && err(e) && process.exit(1); l(`CoinOS Server listening on ${address}`); diff --git a/lib/send.js b/lib/send.js index 54bcd103..eefea080 100644 --- a/lib/send.js +++ b/lib/send.js @@ -20,7 +20,7 @@ export default async (amount, memo, hash, user) => { routingInfo && routingInfo.data.find(d => d.fee_proportional_millionths > 10000) ) { - warn("fee rate too high", d.fee_proportional_millionths); + warn("fee rate too high", routingInfo); throw new Error( "Couldn't find a suitable route to pay to your destination" ); diff --git a/reg.yml b/reg.yml new file mode 100644 index 00000000..e03d9352 --- /dev/null +++ b/reg.yml @@ -0,0 +1,96 @@ +version: '3.6' +services: + app: + depends_on: + - cl + - maria + - bitcoin + - liquid + container_name: app + image: gcr.io/coinos-326717/github.com/coinos/coinos-server:prod + restart: always + environment: + NODE_ENV: production + NODE_OPTIONS: "--es-module-specifier-resolution=node --experimental-modules --loader ./loader.js --openssl-legacy-provider" + HOSTNAME: "${HOSTNAME}" + volumes: + - ./:/app + - ./logs:/logs + networks: + default: + ipv4_address: 172.42.0.22 + maria: + container_name: maria + image: mariadb + restart: always + environment: + MARIADB_ROOT_PASSWORD: password + volumes: + - ./mysql:/var/lib/mysql + bitcoin: + image: ghcr.io/vulpemventures/bitcoin + container_name: bitcoin + volumes: + - ./config/bitcoin:/home/bitcoin/.bitcoin + restart: always + networks: + default: + ipv4_address: 172.42.0.23 + liquid: + image: ghcr.io/vulpemventures/elements + container_name: liquid + volumes: + - ./config/liquid:/home/elements/.elements + restart: always + networks: + default: + ipv4_address: 172.42.0.24 + cl: + depends_on: + - bitcoin + image: elementsproject/lightningd:v0.12.0 + container_name: cl + restart: always + volumes: + - ./config/lightning:/root/.lightning + ports: + - "9736:9735" + networks: + default: + ipv4_address: 172.42.0.25 + lnd: + depends_on: + - bitcoin + - tor + image: lightninglabs/lnd:v0.15.4-beta + container_name: lnd + volumes: + - ./config/lnd:/root/.lnd + - ./config/bitcoin:/root/.bitcoin + - ./config/tor:/etc/tor + ports: + - "9735:9735" + restart: always + networks: + default: + ipv4_address: 172.42.0.26 + tor: + container_name: tor + image: dperson/torproxy + restart: always + volumes: + - ./config/tor:/etc/tor + - ./config/tordata:/var/lib/tor + networks: + default: + ipv4_address: 172.42.0.27 + redis: + restart: always + container_name: redis + image: redis + volumes: + - ./config/redis:/data +networks: + default: + name: net + external: true |
