Sign inSign up

ggian/hostel-server

By ggian

•Updated over 5 years ago

Image
0

93

ggian/hostel-server repository overview

⁠Hostel Server

⁠Overview

The Hostel Server is the serving component of the Hostel Management Software.

It implements the REST API of the Server and offers the main components that interact with the database.

⁠Quick Tour

  • The core package contains the necessary components:
    • models.go contains the basic structs and objects used for CRUD operations
    • search_params.go represent the search criteria
    • service.go is the implementation of the REST API
  • main.go is the entrypoint of the code

⁠Build and Test

After cloning the git repository, run:

$ go build -v ./...
$ go test -v ./...

⁠Docker

To fetch the latest dev Docker image of the hostel server, run:

$ docker pull ggian/hostel-server:dev

If you have a MariaDB setup, you can run the server with the following command:

$ docker run  -e DB_HOST=$DB_HOST -e DB_PASSWORD=$DB_PASSWORD -e DB_USER=$DB_USER -p 5000:5000 -d ggian/hostel-server:dev

where you have to provide the following parameters:

  • DB_HOST
  • DB_PASSWORD
  • DB_USER

Alternatively, you can enjoy a single-click installation through running:

$ docker-compose up -d

inside the _docker directory.

Tag summary

Content type

Image

Digest

Size

343.5 MB

Last updated

over 5 years ago

docker pull ggian/hostel-server:dev