First, start the database :
docker-compose up -d
Then, create the schema inside the database :
docker exec -it url-shortener-database-1 bash # Adapt the container name if needed
# Inside the container, run the following :
PGPASSWORD=root psql -U root -h localhost -c 'CREATE SCHEMA "url-shortener"'
Finally, start the app :
# Build the app
./mvnw -s settings.xml clean install
# Start the app
./mvnw -s settings.xml spring-boot:run
To launch the tests, run :
./mvnw -s settings.xml clean verify
Please access http://localhost:8080/swagger-ui/index.html for easier usage.
Thoughts about the exercise in INFO.md