Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: "Maven Cache"
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-cache-maven-${{ hashFiles('**/pom.xml') }}
Expand Down
68 changes: 64 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,70 @@
.apt_generated/
target/
.DS_Store
### Git ###
!.gitkeep


### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
bin/
.sts4-cache


### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr


### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/

/.nb-gradle/


### VS Code ###
.vscode/

dump.rdb


### OS Specific ###
.DS_Store
.tmp/

tmp/


### Maven ###
logs/
target/

.classpth
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar
.project

buildNumber.properties
dependency-reduced-pom.xml
pom.xml.next
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
release.properties


### Weaver ###
dist/


### Project Specific ###
.env*

!**/src/main/**
!**/src/test/**
65 changes: 65 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<a name="readme-top"></a>
# Contributing to Library Service Status System Service

Though *Library Service Status System Service* is developed and maintained by Texas A&M University Libraries, we welcome community contributions.
Involvement in *Library Service Status System Service* can take many forms.

<div align="right">(<a href="#readme-top">back to top</a>)</div>


## Using

Deploying *Library Service Status System Service* and trying it out at your own institution is itself a way of contributing to the development process.
For more information on deployment strategies please see the [Deployment Guide][deployment-guide].

<div align="right">(<a href="#readme-top">back to top</a>)</div>


## Filing Issues

Once you are using *Library Service Status System Service* the creation of new issues through GitHub is a major method of contribution towards *Library Service Status System Service* development.
Issues can be motivated by the discovery of a bug in the software, or by the desire to see either new features added or see changes to existing features.

There are two primary types of issues:
1. Bug Report
2. Feature Request

A **Bug Report** involves a problem with the existing software or a **Feature** is not working as designed or expected.

A **Feature** involves new functionality or behavior.

<div align="right">(<a href="#readme-top">back to top</a>)</div>


## Creating a Pull Request

Community code and documentation contributions are welcome and should take the form of a **GitHub Pull Request** (*PR*).
Each *PR* will need to be reviewed by a *Library Service Status System Service* developer.
A review will result in the *PR* being accepted and merged, a descriptive request for changes, or the *PR* being closed along with a detailed explanation.

It is our intention to maintain labeling on issues that are deemed to be low difficulty in order to provide a good point of entry for those looking to begin contributing code or documentation.

A *PR* description should include a list of the specific issues resolved, the predicted *semantic versioning* impact of the changes, and a description which characterizes the nature of the changes made.
When creating a *PR*, an issue template is automatically provided to simplify this process.

For more information about *semantic versioning* please see [Semantic Versioning Website][semantic-versioning].
In general keep in mind:

- A **Major Change** is a breaking change that is not backwards compatible.
- A **Minor Change** is a non-breaking change that is backwards compatible to the last **Major Change**.
- A **Patch** is a trivial change or bug fix that should not impact compatibility.

<div align="right">(<a href="#readme-top">back to top</a>)</div>


## Good Luck!

We look forward to seeing your contributions.
If you have any additional questions please contact the *Library Service Status System Service* developers at helpdesk@library.tamu.edu.

<div align="right">(<a href="#readme-top">back to top</a>)</div>


<!-- LINKS -->
[deployment-guide]: DEPLOYING.md
[semantic-versioning]: https://semver.org/
67 changes: 67 additions & 0 deletions DEPLOYING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<a name="readme-top"></a>
# Library Service Status System Service Deployment Guide

## Production Deployments

For **production** deployments, deploy using `docker-compose` via the [LSSS App Repo][app-repo].
This is the recommended method of deployment for production systems.
Go to the [LSSS App Repo][app-repo] and following the deployment instructions there.

Performing the deployment using the [LSSS App Repo][app-repo] should be something similar to the following:
```shell
docker-compose up
```

The **development** deployment can also use `docker-compose` in the same way.

<div align="right">(<a href="#readme-top">back to top</a>)</div>


## Development Deployment using Docker

To manually use `docker` rather than `docker-compose`, run the following:

```shell
docker image build -t lsssservice .
docker run -it lsssservice
```

<sub>_* Note: `-t lsssservice` and `-it lsssservice` may be changed to another tag name as desired, such as `-t developing_on_this` and `-it developing_on_this`._</sub><br>

<div align="right">(<a href="#readme-top">back to top</a>)</div>


## Development Deployment using Maven

Manual deployment can be summed up by running:

```shell
mvn spring-boot:run
```

Those steps are a great way to start but they also fail to explain the customization that is often needed.
There are multiple ways to further configure this for deployment to better meet the desired requirements.

It is highly recommended only to perform *manual installation* when developing.
For **production** deployment, please use `docker-compose` via the [LSSS App Repo][app-repo] or use the **Docker** method above.

<div align="right">(<a href="#readme-top">back to top</a>)</div>


### Directly Configuring the `src/main/resources/application.yml` File

This method of configuration works by altering the configuration file.

With this in mind, the deployment steps now look like:

```shell
# Edit 'src/main/resources/application.yml' here.

mvn spring-boot:run
```

<div align="right">(<a href="#readme-top">back to top</a>)</div>


<!-- LINKS -->
[app-repo]: https://github.com/TAMULib/LibraryServiceStatusSystem
33 changes: 16 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
# Settings.
ARG USER_ID=3001
ARG USER_NAME=lsss
ARG HOME_DIR=/$USER_NAME
ARG SOURCE_DIR=$HOME_DIR/source
ARG SOURCE_DIR=/$USER_NAME/source

# Maven stage.
FROM maven:3-openjdk-11-slim as maven
ARG USER_ID
ARG USER_NAME
ARG HOME_DIR
ARG SOURCE_DIR

# Create the group (use a high ID to attempt to avoid conflits).
RUN groupadd -g $USER_ID $USER_NAME
# Create the user and group (use a high ID to attempt to avoid conflicts).
RUN groupadd --non-unique -g $USER_ID $USER_NAME && \
useradd --non-unique -d /$USER_NAME -m -u $USER_ID -g $USER_ID $USER_NAME

# Create the user (use a high ID to attempt to avoid conflits).
RUN useradd -d $HOME_DIR -m -u $USER_ID -g $USER_ID $USER_NAME
# Update the system and install dependencies.
RUN apt-get update && \
apt-get upgrade -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Update the system.
RUN apt-get update && apt-get upgrade -y
# Make sure source directory exists.
RUN mkdir -p $SOURCE_DIR && \
chown -R $USER_ID:$USER_ID $SOURCE_DIR

# Set deployment directory.
WORKDIR $SOURCE_DIR
Expand All @@ -40,24 +43,20 @@ RUN mvn package -Pjar -DskipTests=true
FROM openjdk:11-jre-slim
ARG USER_ID
ARG USER_NAME
ARG HOME_DIR
ARG SOURCE_DIR

# Create the group (use a high ID to attempt to avoid conflits).
RUN groupadd -g $USER_ID $USER_NAME

# Create the user (use a high ID to attempt to avoid conflits).
RUN useradd -d $HOME_DIR -m -u $USER_ID -g $USER_ID $USER_NAME
# Create the user and group (use a high ID to attempt to avoid conflicts).
RUN groupadd --non-unique -g $USER_ID $USER_NAME && \
useradd --non-unique -d /$USER_NAME -m -u $USER_ID -g $USER_ID $USER_NAME

# Login as user.
USER $USER_NAME

# Set deployment directory.
WORKDIR $HOME_DIR
WORKDIR /$USER_NAME

# Copy over the built artifact from the maven image.
COPY --from=maven $SOURCE_DIR/target/ROOT.jar ./lsss.jar


# Run java command.
CMD ["java", "-jar", "./lsss.jar"]
7 changes: 4 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Copyright (c) 2016 Texas A&M University Libraries
The MIT License (MIT)
Copyright © 2022 Texas A&M University Libraries

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
61 changes: 58 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,61 @@
[![Build Status](https://github.com/TAMULib/LibraryServiceStatusSystemService/workflows/Build/badge.svg)](https://github.com/TAMULib/LibraryServiceStatusSystemService/actions?query=workflow%3ABuild)
[![Coverage Status](https://coveralls.io/repos/github/TAMULib/LibraryServiceStatusSystemService/badge.svg)](https://coveralls.io/github/TAMULib/LibraryServiceStatusSystemService)
[![Build Status][build-badge]][build-status]
[![Coverage Status][coverage-badge]][coverage-status]

# Library Service Status System

A Spring Boot service that allows management and notification of Library System Status.
A *Spring* backend for the *Library Service Status System (LSSS) Service* developed and maintained by [Texas A&M University Libraries][tamu-library].

This is a service for managing *Library Services*.

<details>
<summary>Table of contents</summary>

- [Deployment](#deployment)
- [Developer Documentation](#developer-documentation)
- [Additional Resources](#additional-resources)

</details>


## Deployment

For a quick and easy deployment using `docker-compose` consider using the [Library Service Status System App Repo][app-repo].

For _advanced use cases_, or when `docker-compose` is unavailable, the UI may be either started using `docker` directly or even manually started.
This process is further described in the [Deployment Guide][deployment-guide].

<div align="right">(<a href="#readme-top">back to top</a>)</div>


## Developer Documentation

- [Contributors Documentation][contribute-guide]
- [Deployment Documentation][deployment-guide]
- [API Documentation][api-documentation]

<div align="right">(<a href="#readme-top">back to top</a>)</div>


## Additional Resources

Please feel free to file any issues concerning Library Service Status System Service to the issues section of the repository.

Any questions concerning Library Service Status System Service can be directed to helpdesk@library.tamu.edu.

Copyright © 2022 Texas A&M University Libraries under the [MIT License][license].

<div align="right">(<a href="#readme-top">back to top</a>)</div>


<!-- LINKS -->
[app-repo]: https://github.com/TAMULib/LibraryServiceStatusSystem
[build-badge]: https://github.com/TAMULib/LibraryServiceStatusSystemService/workflows/Build/badge.svg
[build-status]: https://github.com/TAMULib/LibraryServiceStatusSystemService/actions?query=workflow%3ABuild
[coverage-badge]: https://coveralls.io/repos/github/TAMULib/LibraryServiceStatusSystemService/badge.svg
[coverage-status]: https://coveralls.io/github/TAMULib/LibraryServiceStatusSystemService

[api-documentation]: https://tamulib.github.io/LibraryServiceStatusSystemService
[tamu-library]: http://library.tamu.edu
[deployment-guide]: DEPLOYING.md
[contribute-guide]: CONTRIBUTING.md
[license]: LICENSE
Loading