A basic tool to create, edit and apply to football matches https://partidos.com.ar/. We use vegeta load testing tool, docker, NoSQL database, React, and Java with Springboot. The API is documented using OpenApi 3.0, the deployment uses AWS EC2 instance + Cloudflare DNS and there is also a TelegramBot client.
Install Docker + Docker Compose: https://www.docker.com/
In the root of the project /organize-matches
, create a .env
file with the following content:
DOCKER_REGISTRY=tacs2022
# Opcional
# TELEGRAM_BOT_TOKEN=<TOKEN-para-activar-Telegram-Text-Commands>
$ docker login -u tacs2022 -p <registry-password>
mongo-pass.txt
with the password of the root
user of the database (e.g. Pass1234!@) should be created in the root of the project /organize-matches
.Build docker image - MacOS/Linux:
$ make build # Create docker image of all components (backend+frontend)
Run app locally - MacOS/Linux:
# Starts all containers locally.
# Needs to run 'make build' beforehand to pick up the latest changes
make dev
Stop app locally - MacOS/Linux:
make stop # Terminates the execution of all containers
To push an image with the version to be deployed to Dockerhub:
make push-images
Inside EC2 instance:
Download latest tagged image from Docker registry
make pull-images
Run docker project with volume - MacOS/Linux:
# Stop/Clean up old containers
make stop
Run docker project with volume - MacOS/Linux:
# Start containers with a dedicated volume for the Mongo container.
make prod
To see the available HTTP load tests, execute the following command:
make help | grep lt
To modify load testing parameters, modify the following variables in the Makefile:
VEGETA_DURATION = 10s # Test duration in seconds
VEGETA_RATE = 0 # Maximum request rate per second. (0 is infinite)
VEGETA_MAX_WORKERS = 1000 # Maximum number of users (Note: 1 user can make N requests)
We decided to use the MongoDB NoSQL database because we believe that the functionality may vary in the future, and this database is more flexible for adding new functionality than, for example, Cassandra.