Application for generate short url version from long urls, developed with Symfony 5.3, Stimulus, React & Bootstrap. MYSQL as Database and RabbitMQ as Queue service.
###Requirements:
- Docker
- Docker Compose
###Steps for setup
1 - Get the project:
git clone git@github.com:recchia/shortener.git
cd shortener
2 - Rename the follow files and complete environment variables:
docker/mysql/database.env.dist as docker/mysql/database.env
MYSQL_ROOT_PASSWORD=root
MYSQL_DATABASE=database
MYSQL_USER=user
MYSQL_PASSWORD=password
docker/rabbitmq/queue.env.dist as docker/rabbitmq/queue.env
RABBITMQ_ERLANG_COOKIE=cookie12345
RABBITMQ_DEFAULT_USER=rabbitmq
RABBITMQ_DEFAULT_PASS=rabbitmq
RABBITMQ_DEFAULT_VHOST=/
3 - Start containers:
docker-compose up -d
4 - Install vendors:
docker-compose exec php composer install
5 - Install and compile assets:
docker-compose exec php yarn install
docker-compose exec php yarn dev
6 - Execute Migrations:
docker-compose exec php bin/console d:m:m
7 - Execute worker:
docker-compose exec php bin/console messenger:consume async
8 - Load in browser:
-
http://localhost for app
-
http://localhost/admin for dashboard
-
http://localhost/api for swagger UI
###Run Test Suite
docker-compose exec php vendor/bin/phpunit --testdox