hllau / aml-00000-mil

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mileage_calculator

setup up

  1. create mysql schema and user by scripts/db_init.sql

  2. unzip scripts/db_data_init.zip, then run scripts/create_table.sql and then insert.sql

  3. run "mvn package" to build

  4. following env variable would be expected during tomcat startup 00000_DB_USER_NAME 00000_DB_PASSWORD 00000_DB_HOST_NAME 00000_DB_PORT

Docker

(Optional) If there is no MYSQL in place, the following docker command runs a MYSQL server instance and creates a database "nextgen" on startup.

$ docker run -d \
--name temp-mysql \
-e MYSQL_DATABASE=nextgen \
-e MYSQL_ROOT_PASSWORD=nextgenroot \
-e MYSQL_USER=admin \
-e MYSQL_PASSWORD=nextgen \
mysql

Build the docker image with tomcat:8jre

$ ./docker-build.sh

Execute the docker image

$ ./docker-run.sh

Access the application by visiting http://localhost:8080/demo

About


Languages

Language:HTML 78.2%Language:JavaScript 16.5%Language:Java 3.8%Language:CSS 1.5%Language:Batchfile 0.0%Language:Shell 0.0%