Giter Club home page Giter Club logo

ci-spring-boot's Introduction

Build Status

ci-spring-boot

Example of Continuous Integration using Travis and Spring Boot.

This example is a simulation of a Task Manager.

Technologies

Configuration

You need to have installed Java and Maven

Spring Boot

For the development profile you do not need to configure anything. In this profile you will use a h2 database.

If you want to use a production profile, you need to change the database configurations into application-prod.properties. In my example I use a environment variable ${DATABASE_URL} to configure the database url.

Heroku

Create an account and then create a new app.

Into your new app add a Add-ons Postgresql database. By default, the environment variable DATABASE_URL will be created.

Travis CI

Create an account and put your repository to be observed by travis.

In your new listener, you need to configure the environment variable $HEROKU_API_KEY or put directly into a .travis.yml (it's not secure).

You need to change the deploy>app into .travis.yml to the same name of heroku app.

Run

Dev Profile
$ mvn spring-boot:run 
Production Profile
$ mvn spring-boot:run -Dspring.profiles.active=prod

Run with Docker Command Line

$ mvn clean package  
$ docker build -t mytask .  
$ docker run -it -p 8080:8080 --name mytask-container mytask

Run with docker-maven-plugin

$  mvn clean package docker:build --batch-mode release:update-versions  
$ docker run -it -p 8080:8080 --name mytask-container mytask

License

MIT

ci-spring-boot's People

Contributors

gabrielfeitosa avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.