forked from github-mirrorer/taskchampion-sync-server
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a9b9921833 | |||
| a7dc9e84b4 | |||
| 7430d6feec | |||
| ecdfb6bdfd | |||
| 55892d3b2d |
6
Cargo.lock
generated
6
Cargo.lock
generated
@ -1570,7 +1570,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "taskchampion-sync-server"
|
name = "taskchampion-sync-server"
|
||||||
version = "0.6.0"
|
version = "0.6.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-rt",
|
"actix-rt",
|
||||||
"actix-web",
|
"actix-web",
|
||||||
@ -1593,7 +1593,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "taskchampion-sync-server-core"
|
name = "taskchampion-sync-server-core"
|
||||||
version = "0.6.0"
|
version = "0.6.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"chrono",
|
"chrono",
|
||||||
@ -1606,7 +1606,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "taskchampion-sync-server-storage-sqlite"
|
name = "taskchampion-sync-server-storage-sqlite"
|
||||||
version = "0.6.0"
|
version = "0.6.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"chrono",
|
"chrono",
|
||||||
|
|||||||
23
README.md
23
README.md
@ -33,7 +33,7 @@ Every release of the server generates a Docker image in
|
|||||||
and `0.5.1`.
|
and `0.5.1`.
|
||||||
|
|
||||||
The
|
The
|
||||||
[`docker-compose.yml`](https://raw.githubusercontent.com/GothenburgBitFactory/taskchampion-sync-server/refs/tags/v0.6.0/docker-compose.yml)
|
[`docker-compose.yml`](https://raw.githubusercontent.com/GothenburgBitFactory/taskchampion-sync-server/refs/tags/v0.6.1/docker-compose.yml)
|
||||||
file in this repository is sufficient to run taskchampion-sync-server,
|
file in this repository is sufficient to run taskchampion-sync-server,
|
||||||
including setting up TLS certificates using Lets Encrypt, thanks to
|
including setting up TLS certificates using Lets Encrypt, thanks to
|
||||||
[Caddy](https://caddyserver.com/).
|
[Caddy](https://caddyserver.com/).
|
||||||
@ -46,9 +46,14 @@ On that server, download `docker-compose.yml` from the link above (it is pinned
|
|||||||
to the latest release) into the current directory. Then run
|
to the latest release) into the current directory. Then run
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
TASKCHAMPION_SYNC_SERVER_HOSTNAME=taskwarrior.example.com docker compose up
|
TASKCHAMPION_SYNC_SERVER_HOSTNAME=taskwarrior.example.com \
|
||||||
|
TASKCHAMPION_SYNC_SERVER_CLIENT_ID=your-client-id \
|
||||||
|
docker compose up
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The `TASKCHAMPION_SYNC_SERVER_CLIENT_ID` limits the server to the given client
|
||||||
|
ID; omit it to allow all client IDs.
|
||||||
|
|
||||||
It can take a few minutes to obtain the certificate; the caddy container will
|
It can take a few minutes to obtain the certificate; the caddy container will
|
||||||
log a message "certificate obtained successfully" when this is complete, or
|
log a message "certificate obtained successfully" when this is complete, or
|
||||||
error messages if the process fails. Once this process is complete, configure
|
error messages if the process fails. Once this process is complete, configure
|
||||||
@ -56,8 +61,8 @@ your `.taskrc`'s to point to the server:
|
|||||||
|
|
||||||
```
|
```
|
||||||
sync.server.url=https://taskwarrior.example.com
|
sync.server.url=https://taskwarrior.example.com
|
||||||
sync.server.client_id=[your client-id]
|
sync.server.client_id=your-client-id
|
||||||
sync.encryption_secret=[your encryption secret]
|
sync.encryption_secret=your-encryption-secret
|
||||||
```
|
```
|
||||||
|
|
||||||
The docker-compose images store data in a docker volume named
|
The docker-compose images store data in a docker volume named
|
||||||
@ -149,4 +154,12 @@ docker run -t -d \
|
|||||||
|
|
||||||
This start TaskChampion Sync-Server and publish the port to host. Please
|
This start TaskChampion Sync-Server and publish the port to host. Please
|
||||||
note that this is a basic run, all data will be destroyed after stop and
|
note that this is a basic run, all data will be destroyed after stop and
|
||||||
delete container.
|
delete container. You may also set `DATA_DIR`, `CLIENT_ID`, or `LISTEN` with `-e`, e.g.,
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker run -t -d \
|
||||||
|
--name=taskchampion \
|
||||||
|
-e LISTEN=0.0.0.0:9000 \
|
||||||
|
-p 9000:9000 \
|
||||||
|
taskchampion-sync-server
|
||||||
|
```
|
||||||
|
|||||||
@ -1,9 +1,11 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "taskchampion-sync-server-core"
|
name = "taskchampion-sync-server-core"
|
||||||
version = "0.6.0"
|
version = "0.6.1"
|
||||||
authors = ["Dustin J. Mitchell <dustin@mozilla.com>"]
|
authors = ["Dustin J. Mitchell <dustin@mozilla.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Core of sync protocol for TaskChampion"
|
description = "Core of sync protocol for TaskChampion"
|
||||||
|
homepage = "https://github.com/GothenburgBitFactory/taskchampion"
|
||||||
|
repository = "https://github.com/GothenburgBitFactory/taskchampion-sync-server"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
@ -43,12 +43,13 @@ services:
|
|||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
|
|
||||||
tss:
|
tss:
|
||||||
image: ghcr.io/gothenburgbitfactory/taskchampion-sync-server:0.6.0
|
image: ghcr.io/gothenburgbitfactory/taskchampion-sync-server:0.6.1
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
- "RUST_LOG=info"
|
- "RUST_LOG=info"
|
||||||
- "DATA_DIR=/var/lib/taskchampion-sync-server/data"
|
- "DATA_DIR=/var/lib/taskchampion-sync-server/data"
|
||||||
- "LISTEN=0.0.0.0:8080"
|
- "LISTEN=0.0.0.0:8080"
|
||||||
|
- "CLIENT_ID=${TASKCHAMPION_SYNC_SERVER_CLIENT_ID}"
|
||||||
volumes:
|
volumes:
|
||||||
- type: volume
|
- type: volume
|
||||||
source: data
|
source: data
|
||||||
|
|||||||
@ -2,12 +2,28 @@
|
|||||||
set -e
|
set -e
|
||||||
echo "starting entrypoint script..."
|
echo "starting entrypoint script..."
|
||||||
if [ "$1" = "/bin/taskchampion-sync-server" ]; then
|
if [ "$1" = "/bin/taskchampion-sync-server" ]; then
|
||||||
echo "setting data directories"
|
: ${DATA_DIR:=/var/lib/taskchampion-sync-server}
|
||||||
mkdir -p "/var/lib/taskchampion-sync-server/data"
|
export DATA_DIR
|
||||||
chown -R 1092:1092 "/var/lib/taskchampion-sync-server/data"
|
echo "setting up data directory ${DATA_DIR}"
|
||||||
chmod -R 700 "/var/lib/taskchampion-sync-server/data"
|
mkdir -p "${DATA_DIR}"
|
||||||
|
chown -R taskchampion:users "${DATA_DIR}"
|
||||||
|
chmod -R 700 "${DATA_DIR}"
|
||||||
|
|
||||||
|
: ${LISTEN:=0.0.0.0:8080}
|
||||||
|
export LISTEN
|
||||||
|
echo "Listen set to ${LISTEN}"
|
||||||
|
|
||||||
|
if [ -n "${CLIENT_ID}" ]; then
|
||||||
|
export CLIENT_ID
|
||||||
|
echo "Limiting to client ID ${CLIENT_ID}"
|
||||||
|
else
|
||||||
|
unset CLIENT_ID
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$(id -u)" = "0" ]; then
|
if [ "$(id -u)" = "0" ]; then
|
||||||
echo "switching to user 'taskchampion'"
|
echo "Running server as user 'taskchampion'"
|
||||||
exec su-exec taskchampion "$@"
|
exec su-exec taskchampion "$@"
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
eval "${@}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "taskchampion-sync-server"
|
name = "taskchampion-sync-server"
|
||||||
version = "0.6.0"
|
version = "0.6.1"
|
||||||
authors = ["Dustin J. Mitchell <dustin@mozilla.com>"]
|
authors = ["Dustin J. Mitchell <dustin@mozilla.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = false
|
publish = false
|
||||||
|
|||||||
@ -1,13 +1,15 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "taskchampion-sync-server-storage-sqlite"
|
name = "taskchampion-sync-server-storage-sqlite"
|
||||||
version = "0.6.0"
|
version = "0.6.1"
|
||||||
authors = ["Dustin J. Mitchell <dustin@mozilla.com>"]
|
authors = ["Dustin J. Mitchell <dustin@mozilla.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "SQLite backend for TaskChampion-sync-server"
|
description = "SQLite backend for TaskChampion-sync-server"
|
||||||
|
homepage = "https://github.com/GothenburgBitFactory/taskchampion"
|
||||||
|
repository = "https://github.com/GothenburgBitFactory/taskchampion-sync-server"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
taskchampion-sync-server-core = { path = "../core", version = "0.6.0" }
|
taskchampion-sync-server-core = { path = "../core", version = "0.6.1" }
|
||||||
uuid.workspace = true
|
uuid.workspace = true
|
||||||
anyhow.workspace = true
|
anyhow.workspace = true
|
||||||
thiserror.workspace = true
|
thiserror.workspace = true
|
||||||
|
|||||||
Reference in New Issue
Block a user