Go to file
zegkljan 63e79c657c
All checks were successful
continuous-integration/drone/push Build is passing
API doc, removed -reinit-db option.
* Finished API documentation.
* Removed -reinit-db command line argument.

Fix #5
2023-06-11 17:41:26 +02:00
docs API doc, removed -reinit-db option. 2023-06-11 17:41:26 +02:00
errs refining photo handling 2022-02-19 23:38:58 +01:00
models App version management. 2022-09-23 00:59:20 +02:00
server API doc, removed -reinit-db option. 2023-06-11 17:41:26 +02:00
.dockerignore Upgraded go & alpine, fix db checkpointing. 2022-08-09 10:50:49 +02:00
.drone.yml CI: master -> main branch 2022-02-13 17:17:52 +01:00
.gitignore DB migration, proposals. 2022-08-13 02:20:34 +02:00
captain-definition Add CI configs 2022-02-13 17:08:53 +01:00
Dockerfile Removed entrypoint script, launched directly. 2022-08-10 00:28:06 +02:00
go.mod OpenAPI spec, upgraded deps. 2023-06-10 16:12:50 +02:00
go.sum OpenAPI spec, upgraded deps. 2023-06-10 16:12:50 +02:00
main.go API doc, removed -reinit-db option. 2023-06-11 17:41:26 +02:00
README.md API doc, removed -reinit-db option. 2023-06-11 17:41:26 +02:00

Project logo

Organizátorské Kartografické OKO - server

Status GitHub Issues GitHub Pull Requests


📝 Table of Contents

🧐 About

Central server for the OKO app. Manges users, provides map tiles and the whole map tile pack, receives geo features submitted by users and serves them back.

🏗 Building

The only requirement to build the server is go.

In the root of the project, run

go build

which will produce the executable oko-server which you can just run (see Usage).

🎈 Usage

Using docker

Dockerfile is included, therefore to build the docker image, all that is needed to do is to run

docker build -t name:tag /path/to/the/root/of/the/repository

or, if you have no local changes, you can build the image even without cloning the repository at all

docker build -t name:tag https://github.com/Cernobor/oko-server.git

The image can then be run using the name:tag that you have given in the previous step. Volume /data is available to share data between the host and the container.

docker run -v /path/to/data:/data name:tag [options...]

Without docker

Just run the previously built (see Building) executable

/path/to/oko-server [options...]

Options

The server is configurable via a set of options, some of which are required. The table of options follows:

option description
-tilepack <path> Required. File that will be sent to clients when they request a tile pack, also used to serve tiles in online mode.
-port <port> Port where the server will listen. Default is 8080.
-dbfile <path> Path to the sqlite3 database file used for data storage. Will be created, if it does not exist upons startup. Default is ./data.sqlite3.
-min-zoom <int> Minimum supported zoom. Clients will receive this value during handshake. Default is 1.
-default-center-lat <float> Latitude of the default map center, formatted as a floating point number of degrees. Clients will receive this value during handhake. Default is 0.
-default-center-lng <float> Longitude of the default map center, formatted as a floating point number of degrees. Clients will receive this value during handhake. Default is 0.
-max-photo-width <int> Maximum width of stored pohotos. Uploaded photos exceeding this width will be rescaled to fit (keeping aspect ratio). If 0, no scaling will be done. Default is 0.
-max-photo-height <int> Maximum height of stored pohotos. Uploaded photos exceeding this height will be rescaled to fit (keeping aspect ratio). If 0, no scaling will be done. Default is 0.
-photo-quality <int> JPEG photo quality. Photos are reencoded to JPEG with this quality setting when uploaded. Default is 90.
-debug If specified, logging level will be set do debug instead of info. w

⛏️ Built Using

✍️ Authors

See also the list of contributors who participated in this project.

🎉 Acknowledgements

  • Hat tip to anyone whose code was used