Setting up your own TaskServer takes some effort. By running freecinc on the same server as your TaskServer, you allow others access to sync with your TaskServer. Like sharing is caring. Like free beer. Like love and a handshake.
Live on the Web
The original FreeCinc is live on the web at FreeCinc.com
Setting up TaskServer
Ubuntu now has taskd in its apt repositories!!!
sudo apt install taskd
This at least gets you past the building hurdle.
man taskdrc, and
Also see the TaskServer Docs and get help in the taskwarrior channel on FreeNode.
And hopefully you won't need the TaskServer source code
Once you have your TaskServer syncing with a client, set these variables in config/location.yml:
install_dir: wherever pki_dir: wherever/pki salt: whatever
Running taskd Indefinitely
The apt-get version of taskd comes with an startup script, accessible by
service start taskd, but it's not working for me. So I'm still invoking
taskd server explicitly via the script in script/run_taskd_indefinitely.sh
Starting the web server
Then start the web server (ideally in development mode the first time so you can see any error messages)
bundle exec rackup config-freecinc.ru
With port specified:
bundle exec rackup config-freecinc.ru -p 9952
With binding to 0.0.0.0 for use in a VM:
bundle exec rackup config-freecinc.ru -o 0.0.0.0
bundle exec rerun 'rackup config-freecinc.ru -o 0.0.0.0' --background --pattern '*.rb'
It is recommended that you start freecinc using the wrapper script. That way, if it dies, it is immediately replaced with another
nohup bin/run_freecinc_indefinitely.sh &
bundle exec guard -g views
cd /path/to/freecinc && bundle exec sass --watch /path/to/freecinc/public/sass:/path/to/freecinc/public'
Starting taskd on the Server
It is recommended that you start taskd using the wrapper script. That way, if it dies, it is immediately replaced with another
cd freecinc && nohup bin/run_taskd_indefinitely.sh &
bundle exec rspec
GoLang Script to see if sync is still working
The script in tools/restart_unless_sync.go is a remote monitoring service for taskd. If you make changes to restart_unless_sync.go, build it:
go build restart_unless_sync.go
Then commit the changes (and the changes to the executable, which is named 'restart_unless_sync') and push them to a remote monitoring server. Put this in your crontab on the remote monitoring server
LOG=/home/ubuntu/freecinc/tools/log/go.log * * * * * /home/ubuntu/freecinc/tools/bin/restart_unless_sync >> $LOG 2>> $LOG
In order for it to work, you must first set up taskwarrior on the server where you will run this script
Script that kills taskd if the memory usage is too high
It is recommended to run this script once a minute from your production server if you are experiencing occasional memory bloats with taskd:
It is built as a bash script so that it can start up without inducing extra memory penalty (in case the memory is already running out)
MIT License. See LICENSE in this repo.
- Pull details from tools/restart-unless-sync.go out into a config file.
Q: What is the difference between
task sync and
task sync init?
A: pbeckingham says
"init" would be better named as
which means that when you generate new keys, you should run
task sync init
on one client, and if you have additional clients you only need to run
task sync on them.