Crates.io | aocdata |
lib.rs | aocdata |
version | 0.1.0 |
source | src |
created_at | 2023-05-09 20:43:05.688157 |
updated_at | 2023-05-09 20:43:05.688157 |
description | gRPC server interface to database that serves AOC puzzle dataset requests. |
homepage | |
repository | https://gitlab.com/labcycle/aocdata |
max_upload_size | |
id | 860819 |
size | 71,762 |
Aocdata provides data service i.e. datasets for Advent Of Code puzzles.
The service, the request format, and the response format are specified in aocdata.proto
file following the Proto3 language guide.
$ git clone https://gitlab.com/labcycle/aocdata.git
$ cd aocdata
The below commands simulate the database and the server through container images.
Replace podman
with docker
in the following commands to build and run images. NOTE: The build
and run
commands have NOT been tested using docker
.
This database holds datasets of the puzzles. If the database is already setup, skip to Setup Aocdata server section.
NOTE: An example database holding sample datasets is set up below. For more extensive datasets, a new database with datasets should to be set up.
$ podman build -t aocdb -f ./db/Containerfile
$ podman run -dt --name aocdb_container -p 54320:5432 -e POSTGRES_PASSWORD="aocpg" aocdb
Postgresql database URL must be provided as an environment variable AOC_DB_URL
to the container. e.g. AOC_DB_URL="postgres://postgres:aocpg@localhost:54320/aoc"
.
$ podman build -t aocdata -f ./Containerfile
$ podman run -dt --name aocdata_container -p 31370:3137 -e AOC_DB_URL=__PostgresDbUrl__ aocdata
GetData
and client-side DataRequest
mentioning the year and day fields.