项目作者: rburgst

项目描述 :
Simple demonstration Spring Boot application to demonstrate running acceptance tests against a rancher CI stack (docker compose stack).
高级语言: Java
项目地址: git://github.com/rburgst/rancherci-demoapp.git
创建时间: 2017-05-18T21:46:51Z
项目社区:https://github.com/rburgst/rancherci-demoapp

开源协议:

下载


Sample spring boot app to demonstrate jenkins CI with docker

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.

How to setup in IntelliJ

  1. Open the build.gradle and import it as a project
  2. Make sure that you have the lombok plugin installed in IntelliJ
  3. Make sure that “Annotation processing” is enabled under Java Compiler in the IntelliJ settings (more details can be found here).

Run the App

  1. Start the database

    1. cd docker
    2. docker-compose up -d postgres
  2. 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

IntelliJ

  1. Open the Class WebshopApplication and run it as a spring boot application (or java application in case you dont have spring support).

Commandline

  1. ./gradlew bootRun

Docker

  1. build the container

    1. mkdir -p docker/app/context
    2. ./gradlew assemble
    3. cp web/build/libs/web-*.jar docker/app/context/web.jar
    4. cd docker/app
    5. docker build -t demo/web
  2. start the stack

    1. cd docker
    2. docker-compose up -d

More details can be found at Lanyrd.