GithubHelp home page GithubHelp logo

hhy5277 / atsea-sample-shop-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dockersamples/atsea-sample-shop-app

0.0 1.0 0.0 7.23 MB

A sample app that uses a Java Spring Boot backend connected to a database to display a fictitious art shop with a React front-end.

License: Apache License 2.0

Dockerfile 2.22% HTML 1.27% CSS 5.30% Java 39.01% TSQL 4.43% Shell 0.32% PowerShell 2.78% Ruby 1.06% C# 35.70% ASP 0.08% JavaScript 7.82%

atsea-sample-shop-app's Introduction

AtSea Shop Demonstration Application

The AtSea Shop is a demonstration application comprised of:

  • Java REST application written using Spring-Boot,
  • a database for product inventory, customer data, and orders,
  • a React shopping cart,
  • a NGINX reverse proxy implementing https,
  • a payment gateway to simulate certificate management

Requirements

This example uses features in Docker 17.05 CE Edge. Install this version to run the example.

Building and Running the AtSea Shop

Secrets

This application uses Docker secrets to secure the application components. The reverse proxy requires creating a certificate that is stored as a secret and the payment also requires a password stored as a secret. To create a certificate and add as a secret:

mkdir certs

openssl req -newkey rsa:4096 -nodes -sha256 -keyout certs/domain.key -x509 -days 365 -out certs/domain.crt

docker secret create revprox_cert certs/domain.crt

docker secret create revprox_key certs/domain.key

docker secret create postgres_password certs/domain.key

To create a secret for staging the payment gateway:

echo staging | docker secret create staging_token - 

Run as an application

To run the AtSea shop as an application:

docker-compose up --build

Deploy to a swarm

#If you need to create a Swarm
docker swarm init
docker stack deploy -c docker-stack.yml atsea

A simplified development environment

This compose file creates a simplified development environment consisting of only the application server and the database.

docker-compose --file docker-compose-dev.yml up --build

The AtSea Shop

The URL for the content is http://localhost:8080/

REST API

Documentation for REST calls: REST API

atsea-sample-shop-app's People

Watchers

 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.