Giter VIP home page Giter VIP logo

any-sync-dockercompose's Introduction

Docker-compose for any-sync

Self-host for any-sync, designed for personal usage or for review and testing purposes.

Important

This image is suitable for running your personal self-hosted any-sync network for home usage. If you plan to self-host a heavily used any-sync network, please consider other options.

Warning

Before upgrading please read UPGRADE.md

Table of Contents

Prepare

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 build -t generateconfig -f Dockerfile-generateconfig .
    docker run --rm -v ${PWD}/etc:/opt/processing/etc --name any-sync-generator generateconfig
    # 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 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
    

configuration

Use file .env

  • Set specific versions: find and edit variables with suffix "_VERSION"
  • Set external listen host: default 127.0.0.1, for change you need edit variable "EXTERNAL_LISTEN_HOST"

Compatible versions

You can find compatible versions on these pages:

Local build

If you need to create local build binaries for any-sync-*, you can do so by using the "overrides" functionality in docker-compose.

  • clone repos
    install -d repos && for REPO in any-sync-{node,filenode,coordinator,consensusnode}; do if [[ ! -d repos/$REPO ]]; then git clone [email protected]:anyproto/${REPO}.git repos/$REPO; fi; done
    
  • to create a symlink for the "override file," you can either create it yourself as docker-compose.override.yml or use an existing one
    ln -F -s docker-compose.any-sync-node-1.yml docker-compose.override.yml
    
  • restart docker compose
    make restart
    

Limits web admin

open link in browser: http://127.0.0.1:80

Upgrading

For detailed instructions of upgrading to the latest version, please see the UPGRADE.md file.

Changelog

For a detailed list of changes in each version, check out the CHANGELOG.md file.
For auto generate CHANGELOG.md file please use commands:

pip install git-changelog
git-changelog --output CHANGELOG.md

Contribution

Thank you for your desire to develop Anytype together!

โค๏ธ This project and everyone involved in it is governed by the Code of Conduct.

๐Ÿง‘โ€๐Ÿ’ป Check out our contributing guide to learn about asking questions, creating issues, or submitting pull requests.

๐Ÿซข For security findings, please email [email protected] and refer to our security guide for more information.

๐Ÿค Follow us on Github and join the Contributors Community.


Made by Any โ€” a Swiss association ๐Ÿ‡จ๐Ÿ‡ญ

Licensed under MIT.

any-sync-dockercompose's People

Contributors

fb929 avatar mighty-sponge avatar fuksman avatar bududomasidet avatar fat-fellow avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.