-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (45 loc) · 2.2 KB
/
Copy pathdocker-compose.yml
File metadata and controls
46 lines (45 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Example headless deployment (RFC "Local and Self-Hosted Backend Modes" §25). Put this
# behind a reverse proxy (Caddy/nginx/Traefik) that terminates HTTPS for anything reachable
# outside your own LAN — see docs/headless.md and RFC §15. docket itself never becomes a
# certificate authority.
services:
docket:
# No published image yet — build from this checkout. Once one is published (see
# docs/headless.md's "docker buildx build ... --push" step), replace this with
# "image: ghcr.io/pasichdev/docket:latest" to pull instead of building locally.
build: .
restart: unless-stopped
ports:
# The published host port is overridable, because 8788 is exactly the port a machine
# already running `docket serve` outside Docker has taken — and "address already in
# use" on the first command of the quickstart is a bad first impression of a tool whose
# whole promise is that it stays out of your way.
# DOCKET_HOST_PORT=18788 docker compose up -d
- "${DOCKET_HOST_PORT:-8788}:8788"
volumes:
# A NAMED volume, not a bind mount to ./data.
#
# The image runs as an unprivileged user and chowns /data to it at build time. A bind
# mount covers that directory with a host one — which `mkdir -p data` creates owned by
# the host user at 0755 — so the container user cannot write to it, and docket exits at
# startup complaining it has no writable data directory. A named volume inherits the
# image's ownership, which is what makes the documented quickstart work on a fresh
# Linux host without a chown step nobody would guess at.
#
# To keep the data somewhere you can see it, bind-mount instead AND make it writable by
# the container's user first:
# mkdir -p data && sudo chown -R 100:101 data # the image's docket:docket
# volumes: [./data:/data]
- docket-data:/data
environment:
DOCKET_DATA_DIR: /data
DOCKET_SERVER_HOST: 0.0.0.0
DOCKET_SERVER_PORT: 8788
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1:8788/api/v1/health"]
interval: 30s
timeout: 5s
start_period: 10s
retries: 3
volumes:
docket-data: