This repository contains files, configs, and scripts to quickly get started with development of District0x projects. To start a new project simply use this template repo as shown in this document
This is an open-source project and contributions, be it a new issue or pull request, are always welcome. You can find some good advice on how to get started on github's guide
This project has an example Dockerfile that features NodeJS 14, yarn and truffle. There's also a commented out part that handles Clojure and Lein installation. To add clojure support uncomment lines 8 to 14 in docker-builds/base/Dockerfile
.
District0x projects usually rely on the following tech
There are several CI jobs build with Github Actions, that perform various checks for code in the repository. Job files live under .github/workflows
folder. The CI checks for this repository include:
To facilitate development this repository features Makefile that helps to automate lots of tasks. To list available commands simply run make help
. Here's a good tutorial on makefiles https://makefiletutorial.com/. There's also a docker-compose.yml
file that ensures necessary services, network and volumes are up and running locally. Please note that for different projects both makefiles and ci jobs may require modifications.
Try running make
to see the list of available commands.
For example to build docker images for one of the given environments, simply run make build-images
.
Try make up
or make start-containers
to init and start containers for this project. This includes the creation of docker volumes, networks, building docker images, and starting them. To interact with docker-compose directly always add -p develop
or set proper PROJECT_NAME. It should be the same as in the Makefile vars section. This project name will serve as sort of a namespace for docker-compose and it will prefix all the resource names that it manages:
docker-compose -p develop ps
It is also possible to build and start a dev image that contains all the necessary tools to build, test, and run the project: make build-dev-image
and then make exec
.