Docker-Taskd is a containerized Taskwarrior server.
If there are no keys provided in ./taskd/pki
,
the server will generate self-signed certificates
based on the details specified in the docker-compose.yml
.
For the initial start, make sure to provide certificates or check the
certificate values in docker-compose.yml
.
docker-compose up -d
Remember the container id (refered to as $container
),
it's printed as Creating $container
.
If you can't or don't want to use docker-compose, run
docker run -d --name taskd \
-p 53589:53589 \
-v $PWD/taskd:/var/taskd \
-e CERT_CN="taskd" \
-e CERT_ORGANIZATION="some org" \
-e CERT_COUNTRY="DE" \
-e CERT_STATE="Bavaria" \
-e CERT_LOCALITY="Munich" \
x4121/taskd:latest
docker-compose stop
To create a new user named $username
(whitespaces allowed)
as member of the group $group
(no whitespaces allowed) and
create a set of keys with file prefix $user
(no whitespaces allowed):
docker exec -it $container sh
The container name $container
is printed on startup.
If you want to use an existing group, skip this step. Don't use
whitespaces in the group name $group
.
taskd add org '$group'
taskd add user '$group' '$username'
This will print New user key: $cred
.
Copy this value, it's used on the client.
cd pki
gosu taskd ./generate.client $user`
The generated files can be found in ./taskd/pki
Copy the files ca.cert.pem
, $user.cert.pem
and
$user.key.pem
to the client.
Add the following configs to your .taskrc
:
task config taskd.certificate $pathTo/$user.cert.pem
task config taskd.key $pathTo/$user.key.pem
task config taskd.ca $pathTo/ca.cert.pem
task config taskd.server $host:53589
task config taskd.credentials $group/$username/$cred
task sync init
This is only necessary once.
Following synchronizations will be done with task sync
.