From ec1e0bbedd24f168a982d51c25e17c9fe0767e8b Mon Sep 17 00:00:00 2001 From: Grigory Efimov Date: Thu, 16 May 2024 19:09:48 -0300 Subject: [PATCH] Moved the documentation to the wiki --- README.md | 138 +++-------------------------------------------------- UPGRADE.md | 44 ----------------- 2 files changed, 6 insertions(+), 176 deletions(-) delete mode 100644 UPGRADE.md diff --git a/README.md b/README.md index fe32c7c..de67650 100644 --- a/README.md +++ b/README.md @@ -8,140 +8,14 @@ Self-host for any-sync, designed for personal usage or for review and testing pu > [!WARNING] > Before upgrading please read [UPGRADE.md](./UPGRADE.md) -## Table of Contents -- [Prepare](#prepare) -- [Usage](#usage) -- [Configuration](#configuration) -- [Troubleshooting](#troubleshooting) -- [Compatible versions](#compatible-versions) -- [Local build](#local-build) -- [Upgrading](#upgrading) -- [Changelog](#changelog) -- [Contribution](#contribution) - -## Prepare -* install docker and docker-compose https://docs.docker.com/compose/install/linux/ - -## Usage -* start stand - at the first run the directories `etc/` of configuration files and `storage/` for data storage will be generated: - - For Linux, MacOS and other nix* systems: - ``` - make start - ``` - For Windows (Run this in PowerShell, not cmd.exe): - ``` - # Disable auto convert LF to CRLF - # !!! run BEFORE clone repo !!! - git config --global core.autocrlf false - - # Generate config - docker buildx build --tag generateconfig-env --file Dockerfile-generateconfig-env . - docker run --rm --volume ${PWD}/:/code/ generateconfig-env - # Run containers - docker compose up -d - ``` -* stop stand: - ``` - make stop - ``` -* restart stand: - ``` - make restart - ``` -* update image versions and start: - ``` - make update - ``` -* clean unused docker objects: - ``` - make clean - ``` -* clean config and storage files - deleting data for redis, mongo, s3, any-sync-*: - ``` - make cleanEtcStorage - ``` -* show logs: - ``` - docker-compose logs -f any-sync-node - docker-compose logs -f any-sync-filenode - docker-compose logs -f - ``` -* attach to container: - ``` - docker compose exec mongo-1 bash - docker compose exec any-sync-node-1 bash - docker compose exec any-sync-coordinator bash - ``` - -* restart certain container: - ``` - docker compose restart any-sync-node-1 - ``` - -* get current network config - ``` - docker compose exec mongo-1 mongosh 127.0.0.1:27001/coordinator - db.getMongo().setReadPref('primaryPreferred'); db.nodeConf.find().sort( { _id: -1 } ).limit(1) - ``` - -* run client (GUI) - Download client for [desktop](https://download.anytype.io/) - Use `/etc/client.yml` as a network configuration for the clients. - See [the documentation](https://doc.anytype.io/anytype-docs/data-and-security/self-hosting#switching-between-networks) for more details. - -* run client (CLI) - ``` - # macos example - ANYTYPE_LOG_LEVEL="*=DEBUG" ANYPROF=:6060 ANY_SYNC_NETWORK=$(pwd)/etc/client.yml /Applications/Anytype.app/Contents/MacOS/Anytype - ``` - -## Configuration -> [!WARNING] -> The .env file is generated automatically. -It is based on the .env.common file, which is overridden or extended by variables from the .env.override file. -### Version control -By default, we use "prod" image version for any-sync-* daemons. -Also you can use "stage1" or "latest" verions: -``` -# for use stage1 version -ln -F -s .env.override.stage1 .env.override -# for use latest version -ln -F -s .env.override.latest .env.override -``` -### external listen host -By default, we use only the listen address 127.0.0.1, which is sufficient for running tests and a local client. -If you need to connect external clients, please add "EXTERNAL_LISTEN_HOSTS" in .env.override file. -Use spaces separation, multiline is not supported. For example: -``` -EXTERNAL_LISTEN_HOSTS=