Skip to content

s4izh/car-tracking-fullstack

Repository files navigation

Car Tracking

Deployment

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

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.

Endpoints documentation

The endpoints documentation can be found here.

Running the development environment

  • Run docker compose to start all the containers
  • make setup sets up the database and runs the backend
docker-compose up -d
make setup

Docker

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)

Backend dev

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.

MariaDB

Open a shell in the mariadb container, with a prompt inside the database:

docker exec -ti mariadb mysql -U db -prust

Frontend dev

Run the general development enviroment commands here.

Useful commands:

make docker-front # enter the frontend container
make frontend-run # compiles and runs the frontend

Running the blockchain

No containers

Info can be found here

In containers

We recommend the containerized version.

make ganache
make truffle

About

Rust fullstack web app for tracking car stats

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published