diff options
| author | Adam Soltys <[email protected]> | 2022-09-23 00:08:07 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-09-23 00:08:07 +0000 |
| commit | d5187156dcffbc034f22e47e55227ecb8e871b8e (patch) | |
| tree | 7af8796c924c18016e63dda65397bfbf468476fa | |
| parent | 242de8fc9b774c67ea944b9bc0ce73ef4396c21b (diff) | |
| download | coinos-server-d5187156dcffbc034f22e47e55227ecb8e871b8e.tar.gz coinos-server-d5187156dcffbc034f22e47e55227ecb8e871b8e.zip | |
prod config
| -rw-r--r-- | Caddyfile | 3 | ||||
| -rw-r--r-- | db/db.js | 14 | ||||
| -rw-r--r-- | lib/rates.js | 1 | ||||
| -rw-r--r-- | package.json | 2 | ||||
| -rw-r--r-- | prod.yml | 19 |
5 files changed, 23 insertions, 16 deletions
@@ -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 } } @@ -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": { @@ -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 |
