=> Version 2.0 at LifelogBB.
LifelogSPDaemon - Journal, weight, Strength training and endurance training tracker.
This daemon is intend for use in a local network. For securing the access use a proxy like nginx (see below)!
- Weight: ✔️
- Weight chart: ✔️
- Journal: ✔️
- Strength training: ✔️
- Strength training chart: ✔️
- Endurance workout: ✔️
- Endurance workout chart: ✔️
$ git clone https://github.com/spech66/lifelogspd
$ cd lifelogspd
$ docker build . -t lifelogspd
$ docker run -p 8066:8066 -v `pwd`/data:/app/data `pwd`/example.config.json:/app/config.json lifelogspd
Make sure you have the Go Programming Language tools set up an ready.
Checkout the code to your GOPATH
directory, build the server and run it.
go get github.com/spech66/lifelogspd
cd $GOPATH/src/github.com/spech66/lifelogspd
go build
./lifelogspd -config example.config.json
Checkout the code to your GOPATH
directory.
go get github.com/spech66/lifelogspd
cd %GOPATH%\src\github.com\spech66\lifelogspd
go build
lifelogspd.exe -config example.config.json
This daemon is intend for use in a local network. Make sure that the server port (default 8066) is not exposed to the internet. In case you want to host this deamon in the internet set up nginx as a revery proxy for it using basic authentication.
sudo sh -c "echo -n 'admin:' >> /etc/nginx/.htpasswd"
sudo sh -c "openssl passwd -apr1 >> /etc/nginx/.htpasswd"
sudo vi /etc/nginx/sites-enabled/default
server {
listen 8666;
server_name _;
auth_basic "LifelogSPDaemon";
auth_basic_user_file /etc/nginx/.htpasswd;
location / {
proxy_pass http://localhost:8066;
}
}
Create service file at /etc/systemd/system/lifelog.service
. Start with systemctl start lifelog
. Autostart on boot with systemctl enable lifelog
.
[Unit]
Description=LifelogSPDeamon
After=network.target
[Service]
Type=simple
ExecStart=/root/go/src/github.com/spech66/lifelogspd/lifelogspd -bind localhost:8066 -config /root/lifelogspd/config.json
Restart=always
# Consider creating a dedicated user here:
User=root
#Environment=
WorkingDirectory=/root/go/src/github.com/spech66/lifelogspd/
[Install]
WantedBy=multi-user.target
- Go echo web framework - High performance, minimalist Go web framework
- Update Modules:
go mod tidy
- Run:
go run . -config example.config.json