If you only want to try the application without modifying it, run the build and start the components with docker-compose
.
mvn clean package
docker-compose up
When all components are up browse to http://localhost:8080.
Otherwise start each component individually.
docker run --rm --name musicstore-db -e POSTGRES_USER=music -e POSTGRES_PASSWORD=music -e POSTGRES_DB=musicdb -p 5432:5432 postgres
First start a development server:
docker run --rm --name musicstore-couchbase -p 8091-8093:8091-8093 -p 11210:11210 arungupta/couchbase
Then create the album comments bucket:
curl -X POST -u Administrator:password -d name=album-comments -d ramQuotaMB=200 -d authType=none -d proxyPort=11315 http://127.0.0.1:8091/pools/default/buckets
-
Do one time build to pull the dependencies
mvn clean install
-
To run the application in foreground do
mvn vertx:run
with redeploy enabled and usesio.vertx.core.logging.SLF4JLogDelegateFactory
-
To run the applicaiton in background mode i.e. vertx start do
mvn vertx:start
Check fabric8 vertx-maven-plugin for more information and examples on using fabric8 vertx-maven-plugin
The initial dataset has been created with the initdb.groovy
script located at the project root.
It parses a Rhythmbox database file and inserts the data into Postgres.
Then it’s easy to create a script for Flyway.
docker exec musicstore-db pg_dump -a --inserts --exclude-table=schema_version -h 127.0.0.1 -U music musicdb > src/main/resources/db/migration/V2__InsertData.sql