Fleetit is a bike tracking web application where one can monitor and be alerted about speed, temperature, CO2 levels, etc. of bikes on a live-updated map. It was developed as an exercise in Software Engineering where various technologies and methodologies (Docker, Docker Swarm, Kafka, Zookeeper, PostgreSQL, ELK, Metricbeat, NGINX, React, SpringBoot, REST, TDD, NodeJS, WebSockets, Python) come into play in an event-driven architecture.
The entire project is designed to run on a Docker Swarm cluster (enabling easy scalability, replication, zero-downtime deployments, fault tolerance, load balancing) with separate development and production stacks that was eventually deployed on 5 DigitalOcean virtual machines for a proof-of-concept production setup.
Build all images:
./build.sh
Initialize the cluster:
docker swarm init
Deploy the development stack:
docker stack deploy -c development.yml fleetit
Remove the stack:
docker stack rm fleetit
Leave the cluster:
docker swarm leave
Configure the DigitalOcean firewall on all nodes of the cluster to allow Docker Swarm traffic:
./digitalocean_firewall.sh -m
./digitalocean_firewall.sh -w
Initialize the cluster from a manager node:
docker swarm init
Join the cluster on all worker nodes:
docker swarm join --token $TOKEN $MANAGER:2377
Deploy the production stack on the cluster from a manager node:
docker stack deploy -c production.yml fleetit
cd docs/src/
docker run --rm -v "$PWD:/gitbook" -p 4000:4000 billryan/gitbook gitbook serve
cd docs/src/
docker run --rm -v "$PWD:/gitbook" billryan/gitbook gitbook build
rsync -crvz --rsh='ssh' --delete-after --delete-excluded ./_book/* [email protected]:public_html/docs