Apollo WebOS 2 Backend
Go to file
2025-04-02 21:02:58 -04:00
apolloui-v2@5ee3a36ea3 WIP install-v2 2024-01-27 10:16:00 +01:00
backend Apollo E Varient Support 2025-04-02 17:01:22 -04:00
config Added UI as submodule and as static in production, changed endpoint to /api/graphql 2018-11-06 10:19:49 +01:00
docker WIP install-v2 2024-01-27 10:16:00 +01:00
docs Copy Docs 2024-04-11 13:03:36 -04:00
migrations node_max_connections defaults to 64 2024-08-20 10:29:47 +02:00
src default maxConnections to 64 2024-10-30 17:09:18 +01:00
.dockerignore Docker compose changes 2022-07-14 07:28:15 +02:00
.env.sample install-v2 ready 2024-01-27 19:05:35 +01:00
.gitignore Gitignore 2024-04-15 14:28:09 +02:00
.gitmodules WIP install-v2 2024-01-27 10:16:00 +01:00
.nvmrc WIP install-v2 2024-01-27 10:16:00 +01:00
knexfile.js knexfile update 2018-11-05 11:37:13 +01:00
LICENSE Create LICENSE 2021-05-06 15:53:43 -04:00
Makefile build scripts 2018-10-25 15:09:41 +02:00
package.json Update package.json 2025-04-02 21:01:31 -04:00
README.md Update README.md 2018-11-09 08:31:19 +01:00
yarn.lock Removed unused code, updated packages 2024-06-05 11:15:06 +02:00

apolloapi

Install

$ yarn

Run dev

$ yarn dev

It will:

  1. Create .env file in app directory with following variables
  • DATABASE_URL=
  • APP_SECRET
  1. Create sqlite database futurebit.sqlite in app directory and run pending migrations
  2. Start GraphQL API on http://localhost:5000/graphql

Production build

You can't build this on a low-resources MCU (<= 512MB ram), so there is a script to run the builder in a docker that simulates an OrangePI with Armbian and create a file with all the node_modules compiled.

$ ./scripts/build

It will generate the file build//futurebit.tar.gz

Next step required:

  • scp futurebit.tar.gz to the MCU
  • extract it in a tmp directory
  • copy (overwrite) node_modules to /opt/apolloapi directory
  • pull changes
  • restart apollo service

Production usage

In the system MCU there are several commands built-in:

Apollo API manager:

$ sudo systemctl start|stop|restart|status|... apollo

Miner manager:

$ sudo systemctl start|stop|restart|status|... bfgminer

Wifi manager:

$ nmcli help