Skip to content

MassBank/MassBank3-export-service

Repository files navigation

MassBank3-export-service

A REST interface to export MassBank records to other formats.

This server was generated by the OpenAPI Generator project and uses Spring Boot. It uses the RecordParserDefinition from the original MassBank project.

Requirements

  • Java 21
  • Spring Boot 3.4
  • maven

Configuration

This microservice is configured with environment variables. It requires a directory with the MassBank-data release. This directory needs to be configured in the environment variable MB_DATA_DIRECTORY.

git clone https://github.com/MassBank/MassBank-data.git
export MB_DATA_DIRECTORY="./MassBank-data"

To configure CORS you can set the environment variable CORS_ALLOWED_ORIGINS.

export CORS_ALLOWED_ORIGINS=http://localhost:3000

Build and Run

Build the service with Maven: mvn package Run the service: java -jar target/massbank3-export-service-*.jar

Run with Docker

To run the server in a Docker container, execute the following commands:

# Build the image
docker build -t massbank3-export-service .

# Clone the MassBank data repository
git clone https://github.com/MassBank/MassBank-data.git

# Start up a container
docker run -p 8080:8080 \
-v $(pwd)/MassBank-data:/MassBank-data \
-e MB_DATA_DIRECTORY='/MassBank-data' \
massbank3-export-service

Prebuilt Docker images are available from quay.io/massbank/massbank3-export-service. The fastest way to get things running is:

# Clone the MassBank data repository
git clone https://github.com/MassBank/MassBank-data.git

# Start up a container
docker run -p 8080:8080 \
-v $(pwd)/MassBank-data:/MassBank-data \
-e MB_DATA_DIRECTORY='/MassBank-data' \
quay.io/massbank/massbank3-export-service:latest

For a description of the service browse to the swagger UI.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages