Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Latest commit

 

History

History
84 lines (53 loc) · 2.64 KB

CUSTOM_NODE.md

File metadata and controls

84 lines (53 loc) · 2.64 KB

Instruction for create a custom node in local network

To use your own node, you must first install node on your server or on your computer. To be able to connect within the app to a host running on the local network, the Ana app installed on your Android phone must be at least version 1.34.

The following is an example of a server installation to run the application server locally on a home computer. For installation on a remote server, these instructions should also work. However, it is assumed that you will be using a non-self-signed certificate on the remote server, so the Nginx settings will be slightly different.

Requirements

Settings:

  • Computer and phone must be connected to the same network
  • Port 443 must not be busy on the computer

Programms:

docker-compose @latest

If, for example, you already have a Postgres database installed on your machine and you want to use it, then you need to create your own docker-compose file called docker-compose.custom.yml , which imports only the necessary services from docker-compose.yml, just like you did in the docker-compose.ci.yml and docker-compose.dev.yml files.

Get the code

Clone the repository:

git clone https://github.com/kolserdav/ana.git

Change work directory to ana:

cd ana

Set up environment variables

You need to create three .env files from .env.example files

  1. .env
cp .env.example .env
  1. packages/app/.env
cp packages/app/.env.example packages/app/.env
  1. packages/translate2/.env
cp packages/translate2.env.example packages/translate2/.env

Read the comments in these files carefully and adjust the variables according to your network.

Start Docker containers

Base container list:

docker-compose up -d

Custom container list:

docker-compose up -d -f docker-compose.custom.yml

Now wait for the translation container to load all the language models. See container logs. Containers app and server also do not immediately begin to appear on the network, but only after build and launch. Also look at the logs of these containers.

The Ana mobile app, since version 1.34, also works with a self-signed certificate, but if you want to open the web app on your computer, you will need to manually open the addresses of the app (APP_URL), API server (APP_URL:PORT_SSL), and WS server (APP_URL:WS_PORT_SSL, if yout get WS address form console of browser change wss to https) in the browser and specify each as trusted.

Change node in mobile app

  • Open App>settings
  • Change custom node
    custom node local
  • Restart app