Octodemo-Platform / Voyager

Our bookstore, for all our learning needs!
MIT License
0 stars 0 forks source link

Azure Bookstore

This is a simple Maven project that builds a standalone JAR which contains a Jetty webserver and a simple bookstore servlet. The application is able to be built into a container and then available to be deployed as an Azure Web App.

bookstore

The Workflow files in this repository provide the following features:

For a step-by-step guide see: Bookstore Demo

Running the Web Application locally

You can run the web application locally using Maven for development purposes, which can be done either directly if you have Maven and a JDK installed, or inside a container that has Maven and JDK installed.

GitHub Codespaces

This repository is configured with GitHub Codespaces to make it easy to start with a development environment fully configured.

The container used for the development environment is available from https://github.com/octodemo/container-java-development and is publically available. There are multiple versions of this, all with the tags providing a specific combination of tools for various cloud vendors. By default you will get a container with:

Running locally:

To build the software run the following command:

$ mvn package

This will generate a jar file at target/bookstore-v2-1.0.0-SNAPSHOT.jar directory that when run with the command java -jar target/bookstore-v2-1.0.0-SNAPSHOT.jar will run the jetty web server. The logs from the jar file should report the url to access the web server on, which is port 8080 by default.

Running in a Docker container:

The Codespace is configured to build and execute the container as a tasks.

Building and running the container locally without the tasks in GitHub Codespaces can be done using the following;