Simple demonstration Spring Boot application to demonstrate running acceptance tests against a rancher CI stack (docker compose stack).
This application is a demonstration of a simple web application using spring boot, spring data using a postgres
database.
The important trick is that it also provides an automated acceptance test towards a fully deployed
docker-compose stack.
build.gradle
and import it as a projectStart the database
cd docker
docker-compose up -d postgres
depending on your docker setup you might need to change application.properties
to set up the correct
database URL in the key: spring.datasource.url
WebshopApplication
and run it as a spring boot application (or java application in case you dont have spring support).
./gradlew bootRun
build the container
mkdir -p docker/app/context
./gradlew assemble
cp web/build/libs/web-*.jar docker/app/context/web.jar
cd docker/app
docker build -t demo/web
start the stack
cd docker
docker-compose up -d
More details can be found at Lanyrd.