From 918813a6e49f9d05828f6fb205614f9d288269e1 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 21 Sep 2022 19:56:48 -0700 Subject: rm knexfile --- db/index.js | 1 - 1 file changed, 1 deletion(-) (limited to 'db') diff --git a/db/index.js b/db/index.js index 3d5aab36..8c94a4d3 100644 --- a/db/index.js +++ b/db/index.js @@ -1,7 +1,6 @@ import Sequelize from "@sequelize/core"; import db from "$db/db"; -import dbOptions from "$config/knexfile"; db.authenticate().catch(err => { console.debug("Error connecting to database: " + err.message); -- cgit v1.2.3 From 242de8fc9b774c67ea944b9bc0ce73ef4396c21b Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 22 Sep 2022 03:01:12 +0000 Subject: rm knexfile --- db/knexfile.js | 1 - 1 file changed, 1 deletion(-) delete mode 120000 db/knexfile.js (limited to 'db') diff --git a/db/knexfile.js b/db/knexfile.js deleted file mode 120000 index 3cf75ae7..00000000 --- a/db/knexfile.js +++ /dev/null @@ -1 +0,0 @@ -./../config/knexfile.js \ No newline at end of file -- cgit v1.2.3 From d5187156dcffbc034f22e47e55227ecb8e871b8e Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 23 Sep 2022 00:08:07 +0000 Subject: prod config --- Caddyfile | 3 ++- db/db.js | 14 +++----------- lib/rates.js | 1 + package.json | 2 +- prod.yml | 19 ++++++++++++++++--- 5 files changed, 23 insertions(+), 16 deletions(-) (limited to 'db') diff --git a/Caddyfile b/Caddyfile index d179c899..3dc0100b 100644 --- a/Caddyfile +++ b/Caddyfile @@ -1,4 +1,4 @@ -localhost:80 { +:80 { handle_path /api* { reverse_proxy app:3119 } @@ -13,6 +13,7 @@ localhost:80 { handle { root * /coinos + try_files {path}.html {path} /index.html file_server } } diff --git a/db/db.js b/db/db.js index 06fdac89..9e7cc25b 100644 --- a/db/db.js +++ b/db/db.js @@ -1,13 +1,5 @@ import Sequelize from "@sequelize/core"; -import dbOptions from "../config/knexfile"; +import config from "$config"; -let { database, user, password, host } = dbOptions[ - process.env.NODE_ENV -].connection; - -export default new Sequelize(database, user, password, { - host, - dialect: "mariadb", - logging: false, - dialectOptions: { multipleStatements: true, timezone: "Etc/GMT+7" } -}); +let { database, user, password, options } = config.db; +export default new Sequelize(database, user, password, options); diff --git a/lib/rates.js b/lib/rates.js index 8679a08e..e7c16548 100644 --- a/lib/rates.js +++ b/lib/rates.js @@ -5,6 +5,7 @@ import fs from "fs"; import binanceFactory from "./binance"; import { broadcast } from "./sockets"; import store from "./store"; +import { err, warn } from "$lib/logging"; const binance = binanceFactory(); diff --git a/package.json b/package.json index 033cb60f..c67c5388 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": true, "scripts": { - "start": "node index.js", + "start": "nodemon index.js", "dev": "nodemon index.js" }, "dependencies": { diff --git a/prod.yml b/prod.yml index b7ca4b89..d0337cb6 100644 --- a/prod.yml +++ b/prod.yml @@ -3,6 +3,7 @@ services: caddy: container_name: caddy image: caddy:2 + restart: always ports: - "80:80" volumes: @@ -40,7 +41,7 @@ services: container_name: bitcoin volumes: - ./config/bitcoin:/home/bitcoin/.bitcoin - restart: unless-stopped + restart: always networks: default: ipv4_address: 172.42.0.23 @@ -49,19 +50,31 @@ services: container_name: liquid volumes: - ./config/liquid:/home/elements/.elements - restart: unless-stopped + restart: always networks: default: ipv4_address: 172.42.0.24 cl: image: elementsproject/lightningd:v0.12.0 container_name: cl + restart: always volumes: - ./config/lightning:/root/.lightning - restart: unless-stopped + ports: + - "9735:9735" networks: default: ipv4_address: 172.42.0.25 + lnd: + image: lightninglabs/lnd:v0.15.1-beta + container_name: lnd + volumes: + - ./config/lnd:/root/.lnd + - ./config/bitcoin:/root/.bitcoin + restart: always + networks: + default: + ipv4_address: 172.42.0.26 networks: default: name: net -- cgit v1.2.3