diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | db/migrations/referrals.sql | 34 | ||||
| -rw-r--r-- | docker-compose.yml | 4 | ||||
| -rw-r--r-- | routes/payments.js | 8 | ||||
| -rw-r--r-- | sample.override.yml | 13 |
6 files changed, 21 insertions, 40 deletions
@@ -15,3 +15,4 @@ lnurl-server.sqlite3 watcher.log config mysql +docker-compose.override.yml @@ -25,6 +25,7 @@ This repository contains the code for the backend API server which is implemente cp fx.sample fx mkdir mysql cp db/schema.sql mysql/ + cp sample.override.yml docker-compose.override.yml docker-compose up -d --force-recreate maria docker exec -i mariadb mysql -u root -ppassword < mysql/schema.sql docker-compose up diff --git a/db/migrations/referrals.sql b/db/migrations/referrals.sql deleted file mode 100644 index da395d5f..00000000 --- a/db/migrations/referrals.sql +++ /dev/null @@ -1,34 +0,0 @@ --- Note: Adding FK contraints may cause issues, so I have commented them out for now, but these need to be established -DROP TABLE IF EXISTS `referrals`; -CREATE TABLE `referrals` ( - `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, - `token` varchar(255) DEFAULT NULL UNIQUE, - `expiry` date DEFAULT NULL, - `status` enum('pending','active','expired','cancelled') DEFAULT NULL, - `sponsor_id` int(11) NOT NULL, - `user_id` int(11) DEFAULT NULL, - `created_at` timestamp DEFAULT CURRENT_TIMESTAMP, - `updated_at` timestamp, - PRIMARY KEY (`id`), - KEY `sponsor_id` (`sponsor_id`), - KEY `user_id` (`user_id`) - -- FOREIGN KEY (`user_id`) REFERENCES `users` (`id`), - -- FOREIGN KEY (`sponsor_id`) REFERENCES `users` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1; - -DROP TABLE IF EXISTS `waiting_list`; -CREATE TABLE `waiting_list` ( - `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, - `email` varchar(255) DEFAULT NULL UNIQUE, - `sms` varchar(255) DEFAULT NULL, - `user_id` int(11) DEFAULT NULL, - `status` enum('pending','contacted','registered','cancelled') DEFAULT 'pending', - `notes` text DEFAULT NULL, - `created_at` timestamp DEFAULT CURRENT_TIMESTAMP, - `updated_at` timestamp, - PRIMARY KEY (`id`) - -- CONSTRAINT `user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; - -ALTER TABLE users ADD `email` varchar(255) DEFAULT NULL; -ALTER TABLE users ADD `sms` varchar(255) DEFAULT NULL; diff --git a/docker-compose.yml b/docker-compose.yml index 8cbc3aa1..76fa0f3d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,9 +8,7 @@ services: ports: - '8085:8085' environment: - NODE_ENV: development - volumes: - - ../coinos-ui:/coinos + NODE_ENV: production app: depends_on: - maria diff --git a/routes/payments.js b/routes/payments.js index a4bae562..960b0d39 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -56,6 +56,7 @@ ah(async () => { ).map((p) => p.hash); + /* setInterval(async () => { const unconfirmed = ( await db.Payment.findAll({ @@ -134,14 +135,15 @@ ah(async () => { } }, 50); } + */ if (config.liquid) { lq = new BitcoinCore(config.liquid); rare = new BitcoinCore(config.rare); app.post("/liquid/broadcast", optionalAuth, require("./liquid/broadcast")); - app.get("/liquid/generate", auth, require("./liquid/generate")); - app.post("/liquid/fee", auth, require("./liquid/fee")); - app.post("/liquid/send", auth, require("./liquid/send")); + // app.get("/liquid/generate", auth, require("./liquid/generate")); + // app.post("/liquid/fee", auth, require("./liquid/fee")); + // app.post("/liquid/send", auth, require("./liquid/send")); require("./liquid/receive"); setTimeout(async () => { diff --git a/sample.override.yml b/sample.override.yml new file mode 100644 index 00000000..cec5a60f --- /dev/null +++ b/sample.override.yml @@ -0,0 +1,13 @@ +version: '3.6' +services: + ui: + depends_on: + - app + container_name: ui + image: asoltys/coinos-ui + ports: + - '8085:8085' + environment: + NODE_ENV: development + volumes: + - ../coinos-ui:/coinos |
