GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - saisyni/spring-boot-mongo-docker-1: Spring Boot, Mongo and Docker. Run all with a single command.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

9 Commits
9 Commits

Folders and files

NameName
Last commit message
Last commit date
mongo-init
mongo-init
 
 
src/main
src/main
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
README.adoc
README.adoc
 
 
docker-compose.yml
docker-compose.yml
 
 
pom.xml
pom.xml
 
 

Repository files navigation

Table of Contents
  • What you’ll build
  • What you’ll need
  • Set up a Spring Boot app
  • Containerize It
  • Summary
  • See Also

This guide walks you through the process of building a Docker image for running a Spring Boot application with mongo database.

What you’ll build

Docker is a Linux container management toolkit with a "social" aspect, allowing users to publish container images and consume those published by others. A Docker image is a recipe for running a containerized process, and in this guide we will build one for a simple Spring boot application.

What you’ll need

https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/prereq_editor_jdk_buildtools.adoc

Set up a Spring Boot app

If you want to run with Maven, execute:

./mvn package && java -jar target/spring-boot-mongo-docker-1.0.0.jar

and go to http://localhost:8080/customer/ to see your persisted customers.

Containerize It

If you want to run with Docker, execute:

./docker-compose up

Summary

Congratulations! You’ve just created a Docker container for a Spring Boot app! Spring Boot apps run on port 8080 inside the container by default and we mapped that to the same port on the host using "-p" on the command line.

See Also

The following guides may also be helpful:

  • Serving Web Content with Spring MVC

  • Building an Application with Spring Boot

https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/footer.adoc

About

Spring Boot, Mongo and Docker. Run all with a single command.

davidromeroalcaide.wordpress.com/2017/10/07/spring-boot-mongo-and-docker-run-all-with-a-single-command/

Resources

Readme
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.