Skip to content
Grigory Efimov edited this page May 16, 2024 · 6 revisions

Prepare

Windows OS specifics

All commands should be run in PowerShell, not in cmd.exe.

Disable auto convert LF to CRLF

!!! run BEFORE clone repo !!!

git config --global core.autocrlf false

run docker-compose

In the Windows operating system, the make utility is typically absent.
Therefore, you will need to run docker-compose manually.

# 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

Linux\MacOS

  • start stand - at the first run the directories etc/ of configuration files and storage/ for data storage will be generated:
    make start
    
  • 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
    

Hints

  • 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 Use <pathToRepo>/etc/client.yml as a network configuration for the clients. See the documentation 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
    
Clone this wiki locally