Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thevxn/swis-api
in-memory catalogue information system for Docker with RESTful JSON API
https://github.com/thevxn/swis-api
api-first cache-storage catalogue catware database docker docker-compose golang in-memory information-system json-api osint
Last synced: 14 days ago
JSON representation
in-memory catalogue information system for Docker with RESTful JSON API
- Host: GitHub
- URL: https://github.com/thevxn/swis-api
- Owner: thevxn
- License: mit
- Created: 2023-05-17T01:38:18.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-10-22T21:14:18.000Z (23 days ago)
- Last Synced: 2024-10-30T08:18:37.964Z (16 days ago)
- Topics: api-first, cache-storage, catalogue, catware, database, docker, docker-compose, golang, in-memory, information-system, json-api, osint
- Language: Go
- Homepage:
- Size: 845 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# swis-api (swapi) v5.18
[![Go Reference](https://pkg.go.dev/badge/go.vxn.dev/swis/v5.svg)](https://pkg.go.dev/go.vxn.dev/swis/v5)
[![Go Report Card](https://goreportcard.com/badge/go.vxn.dev/swis/v5)](https://goreportcard.com/report/go.vxn.dev/swis/v5)
[![release](https://img.shields.io/github/release/thevxn/swis-api.svg?style=flat-square)](https://github.com/thevxn/swis-api/releases/latest)[![swis-api CI/CD pipeline](https://github.com/thevxn/swis-api/actions/workflows/deployment.yml/badge.svg?branch=master)](https://github.com/thevxn/swis-api/actions/workflows/deployment.yml)
sakalWebIS v5 RESTful JSON API in Go for Docker
`swapi` is a condensated data structure tree made into an Information System (IS) environment. It works as an independent in-memory database/cache for generic system components like `users`, `roles`, `projects`, `business_entities` and many more. Primarily, it is meant to be used in Docker as all components are written to work out of the box when there (no go runtime installment needed when run in Docker).
Read more in a short article on `swapi`:
+ https://krusty.space/projects/swis-api
### simple way to run (docker stack without a reverse-proxy)
```
git clone https://github.com/thevxn/swis-api
cp .env.example .env
vi .envmake build run
```or use Github Action Runner (self-hosted) to (re)delpoy `swapi` using Actions Secrets (Settings -> Secrets and variables -> Actions -> New repository secret), use these keys at least:
```
# without http/https prefix amd HTTP path
APP_URL
# token used for redeployment dump and data reimport (`dump_data` and `import_data` workflow jobs)
ROOT_TOKEN# if you want to log to Loki, define an URL (full) to the loki instance
LOKI_URL
# defaults to 'debug', specify 'release' in .env or in GHA secret for production
GIN_MODE
```### install latest binary (go runtime installed required)
```
go install go.vxn.dev/swis/v5@latestGIN_MODE=release ROOT_TOKEN=xxx SERVER_PORT=8050 ~/go/bin/swis
````swapi` could be run as a single binary too. However, some environment constants have to be set when running it solitarily --- mainly `SERVER_PORT` and `ROOT_TOKEN` environment variables are required for the app's smooth start-up.
### development
`swapi` development environment is made in Docker too, it is simple to run a local instance using:
```
make fmt dev
```Then, the local instance could be accessed via http://localhost:8051. To contribute, simply make a new branch and create a new pull request.