Skip to content

Commit

Permalink
Progress soft programming challenge without code coverage and results…
Browse files Browse the repository at this point in the history
… retrieval.
  • Loading branch information
aliraza995 committed Jun 1, 2017
0 parents commit 6db6d19
Show file tree
Hide file tree
Showing 306 changed files with 120,642 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# README #

The application provide docker for deployment.

### Test Data? ###

* Test data with 100000 deals is in deals-data.csv under "test-data" folder.
* To run the application run "db-docker.sh" first then run "app-docker.sh". Remember before running the container build the project first using "mvn clean install".
27 changes: 27 additions & 0 deletions app-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

IMG_NAME=img-progsoft-app
CT_NAME=ct-progsoft-app
NET_NAME=progsoftnet

echo stopping $CT_NAME
docker stop $CT_NAME

echo removing $CT_NAME
docker rm -vf $CT_NAME

echo removing $IMG_NAME
docker rmi $IMG_NAME

echo updating docker contents
rm -rf docker/app/*.war
cp target/*.war docker/app

echo building $IMG_NAME
docker build -t $IMG_NAME docker/app

echo creating newtork
docker network create $NET_NAME

echo running $CT_NAME
docker run -d -p 8080:8080 --net=$NET_NAME --name $CT_NAME $IMG_NAME
23 changes: 23 additions & 0 deletions db-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

IMG_NAME=img-progsoft-db
CT_NAME=ct-progsoft-db
NET_NAME=progsoftnet

echo stopping $CT_NAME
docker stop $CT_NAME

echo removing $CT_NAME
docker rm -vf $CT_NAME

echo removing $IMG_NAME
docker rmi $IMG_NAME

echo building $IMG_NAME
docker build -t $IMG_NAME docker/db

echo creating newtork
docker network create $NET_NAME

echo running $CT_NAME
docker run -d -p 3306:3306 --net-alias=db --net=$NET_NAME --name $CT_NAME $IMG_NAME
4 changes: 4 additions & 0 deletions docker/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

FROM tomcat:8.5.15-jre8

COPY *.war webapps
5 changes: 5 additions & 0 deletions docker/db/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM mysql:5.7

ENV MYSQL_ROOT_PASSWORD root
ENV MYSQL_DATABASE progresssoft
ENV --max-allowed-packet 50M
Loading

0 comments on commit 6db6d19

Please sign in to comment.