Skip to content

Commit

Permalink
Add Makefile, Readme and dev.Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
matsbov committed Aug 23, 2023
1 parent eb0490d commit 43303a6
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Makefile
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
27 changes: 27 additions & 0 deletions sbdi/README.md
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
```
11 changes: 11 additions & 0 deletions sbdi/dev.Dockerfile
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

0 comments on commit 43303a6

Please sign in to comment.