forked from AtlasOfLivingAustralia/dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Makefile, Readme and dev.Dockerfile
- Loading branch information
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
run: | ||
./gradlew bootRun | ||
|
||
docker-build: | ||
./gradlew clean build | ||
docker build -t dashboard-dev --file sbdi/dev.Dockerfile . | ||
|
||
docker-run: | ||
docker run -p 8080:8080 --rm --name dashboard-dev dashboard-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Dashboard | ||
|
||
## Setup | ||
|
||
Create data directory at `/data/dashboard` and populate as below (it is easiest to symlink the config files to the ones in this repo): | ||
``` | ||
mats@xps-13:/data/dashboard$ tree | ||
. | ||
├── config | ||
│ ├── dashboard-config.properties -> /home/mats/src/biodiversitydata-se/dashboard/sbdi/data/config/dashboard-config.properties | ||
├── csv | ||
├── data.json -> /home/mats/src/biodiversitydata-se/dashboard/sbdi/data/data.json | ||
└── zip | ||
``` | ||
|
||
## Usage | ||
|
||
Run locally: | ||
``` | ||
make run | ||
``` | ||
|
||
Build and run in Docker (using Tomcat): | ||
``` | ||
make docker-build | ||
make docker-run | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM tomcat:9.0-jdk11-temurin | ||
|
||
RUN mkdir -p \ | ||
/data/dashboard/config \ | ||
/data/dashboard/csv \ | ||
/data/dashboard/zip | ||
|
||
COPY sbdi/data/data.json /data/dashboard/data.json | ||
COPY sbdi/data/config/dashboard-config.properties /data/dashboard/config/dashboard-config.properties | ||
|
||
COPY build/libs/dashboard-2.5.0-plain.war $CATALINA_HOME/webapps/ROOT.war |