Automatic deployment of all containers can be done with the following:
docker-compose -f prod.yml build
docker-compose -f prod.yml up
The script cronjob can be used as a cronjob to automate the deployment.
Blockchain deployment has to be done manually, after running the previous commands run the following:
make ganache
make truffle
We recommend using tmux for handling multiple shells.
The endpoints documentation can be found here.
- Run docker compose to start all the containers
make setup
sets up the database and runs the backend
docker-compose up -d
make setup
The following command will give you a shell in $CONTAINER_NAME,
check the Makefile
since some names are shortened.
make docker-$CONTAINER_NAME
Remove everything in case of random cache failures and whatever:
docker system prune -a
docker rm -f $(docker ps -aq)
docker rmi -f $(docker images -aq)
docker volume rm $(docker volume ls -q)
After docker-compose up -d
these are useful commands:
make backend-setup # compiles and runs the backend
make db-setup # sets up the database
make db-reset # resets the database
Note there's no need of make setup
when developing the backend, since we do
it manually.
Open a shell in the mariadb
container, with a prompt inside the database:
docker exec -ti mariadb mysql -U db -prust
Run the general development enviroment commands here.
Useful commands:
make docker-front # enter the frontend container
make frontend-run # compiles and runs the frontend
Info can be found here
We recommend the containerized version.
make ganache
make truffle