Our Personal Data Server from scratch!
0

Configure Feed

Select the types of activity you want to include in your feed.

chore: add app service with cargo-watch

Spins up a container with Tranquil running, but automatically uses incremental rebuilds for local dev.

Signed-off-by: Trezy <tre@trezy.com>

author
Trezy
committer
Tangled
date (May 19, 2026, 7:46 PM +0300) commit 3fd8f7eb parent 0afcb2ee
+81
+20
Dockerfile.dev
··· 1 + FROM rust:1.92-alpine 2 + 3 + RUN apk add --no-cache \ 4 + ca-certificates \ 5 + musl-dev \ 6 + pkgconfig \ 7 + openssl-dev \ 8 + openssl-libs-static \ 9 + mold \ 10 + clang \ 11 + protoc 12 + 13 + RUN cargo install cargo-watch 14 + 15 + ENV RUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=mold" 16 + ENV SQLX_OFFLINE=true 17 + 18 + WORKDIR /app 19 + 20 + CMD ["cargo", "watch", "-x", "run -p tranquil-server -- --config /app/config.dev.toml"]
+30
config.dev.toml
··· 1 + [server] 2 + hostname = "pds.test" 3 + allow_http_proxy = true 4 + invite_code_required = false 5 + disable_rate_limiting = true 6 + 7 + [frontend] 8 + enabled = true 9 + dir = "/app/frontend/public" 10 + 11 + [database] 12 + url = "postgres://postgres:postgres@db:5432/pds" 13 + 14 + [storage] 15 + path = "/var/lib/tranquil-pds/blobs" 16 + 17 + [plc] 18 + directory_url = "http://plc:2582" 19 + 20 + [email] 21 + from_address = "noreply@pds.test" 22 + from_name = "Tranquil PDS (Dev)" 23 + 24 + [email.smarthost] 25 + host = "mailpit" 26 + port = 1025 27 + tls = "none" 28 + 29 + [secrets] 30 + allow_insecure = true
+31
docker-compose.yaml
··· 17 17 db: 18 18 condition: service_healthy 19 19 20 + app-dev: 21 + profiles: [dev] 22 + build: 23 + context: . 24 + dockerfile: Dockerfile.dev 25 + command: > 26 + sh -c ' 27 + cp /certs/pds.test.pem /usr/local/share/ca-certificates/pds.test.crt 28 + update-ca-certificates 29 + cargo watch -x "run -p tranquil-server --features native-tls-roots -- --config /app/config.dev.toml" 30 + ' 31 + environment: 32 + SERVER_HOST: "0.0.0.0" 33 + SQLX_OFFLINE: "true" 34 + PLC_DIRECTORY_URL: "http://plc:2582" 35 + volumes: 36 + - ./:/app 37 + - cargo_target:/app/target 38 + - cargo_registry:/usr/local/cargo/registry 39 + - blob_data:/var/lib/tranquil-pds/blobs 40 + - certs:/certs:ro 41 + depends_on: 42 + traefik: 43 + condition: service_started 44 + db: 45 + condition: service_healthy 46 + plc: 47 + condition: service_started 48 + 20 49 frontend: 21 50 profiles: [prod] 22 51 build: ··· 108 137 blob_data: 109 138 store_data: 110 139 prometheus_data: 140 + cargo_target: 141 + cargo_registry: 111 142 certs: