mirror of
https://github.com/GothenburgBitFactory/taskchampion-sync-server.git
synced 2026-04-05 17:20:35 +00:00
* feat(docker): simplify docker compose for end users The previous docker-compose requires end user to manually handle permissions of taskchampion data dir. And this commit has directories automatically set up in docker-entrypoint.sh, just like what postgresql did in https://github.com/docker-library/postgres/blob/master/docker-entrypoint.sh * fix(docker): revert to anonymous data volume for compatibility * feat: use uid 1092 for taskchampion * fix(docker): revert mkdir This is embarrassing that subpaths are not automatically created. So we still need mkdir service in case of anonymous data volume. * fix(docker): typo
63 lines
1.5 KiB
YAML
63 lines
1.5 KiB
YAML
volumes:
|
|
data:
|
|
|
|
|
|
services:
|
|
mkdir:
|
|
image: caddy:2-alpine
|
|
command: |
|
|
/bin/sh -c "
|
|
mkdir -p /data/caddy/data /data/caddy/config /data/tss/taskchampion-sync-server"
|
|
volumes:
|
|
- type: volume
|
|
source: data
|
|
target: /data
|
|
read_only: false
|
|
volume:
|
|
nocopy: true
|
|
|
|
caddy:
|
|
image: caddy:2-alpine
|
|
restart: unless-stopped
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- type: volume
|
|
source: data
|
|
target: /data
|
|
read_only: false
|
|
volume:
|
|
nocopy: true
|
|
subpath: caddy/data
|
|
- type: volume
|
|
source: data
|
|
target: /config
|
|
read_only: false
|
|
volume:
|
|
nocopy: true
|
|
subpath: caddy/config
|
|
command: caddy reverse-proxy --from https://${TASKCHAMPION_SYNC_SERVER_HOSTNAME} --to http://tss:8080
|
|
depends_on:
|
|
mkdir:
|
|
condition: service_completed_successfully
|
|
|
|
tss:
|
|
image: ghcr.io/gothenburgbitfactory/taskchampion-sync-server:0.5.0
|
|
restart: unless-stopped
|
|
environment:
|
|
- "RUST_LOG=info"
|
|
- "DATA_DIR=/var/lib/taskchampion-sync-server/data"
|
|
- "LISTEN=0.0.0.0:8080"
|
|
volumes:
|
|
- type: volume
|
|
source: data
|
|
target: /var/lib/taskchampion-sync-server/data
|
|
read_only: false
|
|
volume:
|
|
nocopy: true
|
|
subpath: tss/taskchampion-sync-server
|
|
depends_on:
|
|
mkdir:
|
|
condition: service_completed_successfully
|