Skip to content

Commit ed358ca

Browse files
committed
Update README.md and clean up
1 parent 516d9be commit ed358ca

8 files changed

Lines changed: 18 additions & 84 deletions

File tree

README.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ RequestHeader set X-Forwarded-Port 443
4949

5050
To make this work with a K8s nginx Ingress one needs to enable the property
5151

52-
```bash
52+
```
5353
use-forwarded-headers true
5454
```
5555

@@ -59,39 +59,40 @@ If not set / is used by default.
5959

6060
### PostgreSQL
6161

62-
Make sure to have a [PostgreSQL](https://www.postgresql.org) server installed and running on your system. The MassBank data will be stored there.
62+
Make sure to have a [PostgreSQL](https://www.postgresql.org) server installed and running on your system. The MassBank
63+
data will be stored there.
6364

64-
By default, the export service expects the PostgreSQL service running at _localhost_ with port 5432 and the database _postgres_. Default user is _postgres_ and password is _postgres_.
65+
By default, the export service expects the PostgreSQL service running at _localhost_ with port 5432 and the database
66+
_records_. Default user is _massbank_export_api_user_ and password is _massbank-export-api-password_.
6567

66-
## Build and Run
6768

68-
Run the _run-cmd.sh_ script to let build the JAR file in _target_ directory and to start the export api service with all pre-configured variables.
69+
## Build and Run
6970

70-
```bash
71-
sh run-cmd.sh
72-
```
71+
Build the service with Maven:
72+
```mvn package```
73+
Run the service:
74+
```java -jar target/massbank-export-api-*.jar```
7375

7476
## Run with Docker
7577

7678
### Build and Run
7779

78-
Start the _run-docker.sh_ script to let build and run the server in a Docker container with default settings.
80+
The file `docker-compose.yml` provides the config to build and run the postgres database and the MassBank-export-api
81+
with docker. First build the package with `mvn package` as described above. Then copy `env.dist` file to `.env` file
82+
and configure to your needs. Then build and run with:
7983

8084
```bash
81-
sh run-docker.sh
85+
docker compose up --build
8286
```
8387

8488
### Use Pre-built Container
8589

8690
Pre-built Docker images are available from
8791
[quay.io/massbank/massbank-export-api](https://quay.io/repository/massbank/massbank-export-api).
88-
The fastest way to get things running is:
92+
The fastest way to get things running after creating `.env` is:
8993

9094
```bash
91-
# Start up a container in detached mode
92-
docker run -d -p 8080:8080 \
93-
-v $MB_DATA_DIRECTORY:/MassBank-data \
94-
quay.io/massbank/massbank-export-api:latest
95+
docker compose up
9596
```
9697

9798
## Usage

compose/.env

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ services:
2424
start_period: 40s
2525

2626
export-service:
27+
image: quay.io/massbank/massbank-export-api:latest
2728
build:
2829
context: ..
2930
dockerfile: Dockerfile
31+
pull_policy: always
3032
restart: always
3133
ports:
3234
- "8080:8080"

entrypoint.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.
File renamed without changes.

initDB.sh

Lines changed: 0 additions & 18 deletions
This file was deleted.

run-cmd.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.

run-docker.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)