This is the first of a series of blog posts that demonstrates using Docker to develop a typical web application and deploying it in production. For DockerCon 2017, we wanted to build a new demo application that would demonstrate the flexibility of using Docker in development as well as showcase the features of Docker in a production environment. The result was the AtSea Shop, a storefront application that can be deployed on different operating systems and can be customized to both your enterprise development and operational environment.
A Hybrid Architecture
The application combines a typical Java n-tier architecture that uses Spring Boot’s web MVC framework for the REST API and Spring Data to manage database operations. We chose PostgreSQL for the database, but the application can use any database defined by Spring Data. The storefront client was developed separately using React, and added to the AtSea jar file. Finally, we used a bash script to simulate a payment gateway that uses secrets to authorize transactions.
Developing and Deploying with Docker
Developing an application with a distributed team can be challenging. Docker provides significant advantages when developing an application by:
- enabling migration to microservices
- establishing a consistent deployment environment
- developers can use familiar tools and IDEs
- allowing for rapid implementation and testing of ideas
- simplifying the process to deploying to production
- easily develop polyglot applications with multiple programming languages
- building in security tools
- enabling quick deployment of your application
In following articles, we’ll go into depth on the following topics
- developing with Eclipse and Docker
- using multistage builds to create containers
- implementing container security using secrets
- deploying the application to a cluster
- running the application in Windows containers
While you’re waiting, check out these developer resources and videos from Dockercon 2017.