Caching server for use with EDDI and EDDN.
brew install zmq
.apt-get install libzmq3-dev
./getDependencies
will get any Go dependencies.Environment variable | Default value | Meaning |
---|---|---|
EDDP_API_DATA_DIR |
./data |
Directory for downloaded data and SQL database |
EDDP_API_HTTP_ADDR |
":8080" |
TCP address for the HTTP server |
EDDP_API_HTTP_ROOT |
"./data/http" |
Static file root directory for the HTTP server |
EDDP_API_EDDN_LISTENER_URL |
"tcp://eddn.edcd.io:9500" |
URL for the EDDN listener |
EDDP_API_EDDN_PUBLISHER_URL |
"tcp://*:5556" |
URL for the EDDN publisher |
./getDependencies
to get all required Go packages../formatAll
to format all Go source according to standards (Go is rather prescriptive about that)../buildAll
to build all Go source.
.gitignore
.refreshEDDB
to fetch the latest data from EDDB to ${dataDir}/eddb
. At the time of writing this totals about 3.5GB). This script calls ...rebuild
to import this fetched data into SQLite. On a 2011 MacBook Air this can take around 12 min and the resulting SQLlite file is around 8.5GB. Once it completes, you need to
systemctl stop eddpd; systemctl stop eddnlistener
.${dataDir}/sqlite/eddp.sqlite
with ${dataDir}/sqlite/eddp-new.sqlite
systemctl start eddpd; systemctl start eddnlistener
.${dataDir}/eddb
can then be zipped or discarded.systemd_configs/eddpd.service.txt
and systemd_configs/eddnlistener.service.txt
. These assume an installation path of /var/go/EDDP-API
, so change that if necessary.eddpd.env
and eddnlistener.env
, one per line, in the form NAME=value
.eddpd.service.txt
and eddnlistener.service.txt
without the .txt
suffix to /etc/systemd/system/
(the .txt
suffix is only there to stop macOS from misinterpreting the file type).
cd systemd_configs
cp eddpd.service.txt /etc/systemd/system/eddpd.service
cp eddnlistener.service.txt /etc/systemd/system/eddnlistener.service
cd ..
systemctl start eddpd
systemctl start eddnlistener
systemctl status eddpd
systemctl status eddnlistener
systemctl enable eddpd
systemctl enable eddnlistener