This repository hosts the source code of Bitcratic backend. The backend provides off-chain orderbook functionality and an API to get a filtered view of Ethereum blockchain events on an EtherDelta-like contract.
Best way to learn about a system is to read the source code. Start with a look at docker-compose.yml.
For information and documentation on Bitcratic API, look here: https://github.com/bitcratic/backend-replacement/tree/master/docs/api
Setting up a development environment
- Some sort of shell environment
- A reasonably recent version of Docker (>= 17.06, ideally 17.12)
- docker-compose (= 1.18)
- Basic familiarity with Docker keywords: image, container (https://docs.docker.com/get-started/#docker-concepts)
- Clone the repo (git clone https://github.com/bitcratic/backend-replacement.git)
- Navigate to the root of the working copy, where the README file is.
- Uncomment the
.envto enable mounting of working copy code into the containers.
- Build a Docker image containing our backend code:
docker-compose build contract_observer
- Create the database and migrate it to the latest schema:
docker-compose run contract_observer alembic upgrade head
- Run the backend systems:
docker-compose up. You can shut everything down with Ctrl+C at any time.
- There are multiple containers running our backend code:
docker-compose build <service-name>for any of the above builds the same image.
docker-compose build contract_observerbuilds an image, copying the code and installing Python libraries in our dependencies. You have to rebuild any time the dependencies change; however, in development, code in the working copy is mounted into the container, so it's enough to restart the container (with
docker-compose restart <service-name>) to apply changes for a given service.
- You can inspect the list of currently running containers with
Copyright (C) 2018, Arseniy Ivanov and Bitcratic Contributors
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
See the full license.