Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (65 loc) · 2.61 KB
/
Copy pathdocker-compose.yml
File metadata and controls
70 lines (65 loc) · 2.61 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Probyte from Docker Hub. Nothing to set up: the database password is generated on first start.
#
# curl -fsSL https://raw.githubusercontent.com/mpgithubcode/Probyte/main/deploy/install.sh | sh
#
# or by hand: curl -fsSLO https://raw.githubusercontent.com/mpgithubcode/Probyte/main/deploy/docker-compose.yml
# docker compose up -d → http://localhost:8080
#
# Optional settings go in a .env file next to this one (see .env.example in the repository): PROBYTE_PORT, TZ,
# PUBLIC_URL, ALLOW_SIGNUP, BACKUP_INTERVAL… Upgrade: docker compose pull && docker compose up -d
# Phones sync calendars and contacts through Probyte's own address (no extra port).
# Logs are rotated (10 MB × 5 per service) so months of requests don't fill the disk.
x-logging: &logging
driver: json-file
options:
max-size: "10m"
max-file: "5"
services:
probyte:
logging: *logging
image: mpgithubcode/probyte:${PROBYTE_VERSION:-latest}
restart: unless-stopped
ports:
- "${PROBYTE_PORT:-8080}:8000"
env_file:
- path: .env
required: false
environment:
PROBYTE_ALL_IN_ONE: "true" # web app (with the calendar server) and worker in one container
POSTGRES_PASSWORD_FILE: /run/probyte/db-password
DEFAULT_TZ: ${DEFAULT_TZ:-${TZ:-UTC}}
OFFICE_CONVERTER_URL: ${OFFICE_CONVERTER_URL-http://office:3000}
volumes:
- probyte-data:/data # attachments, backups, encryption key (calendars and contacts are in the database)
- secrets:/run/probyte:ro
depends_on:
db:
condition: service_healthy
db:
logging: *logging
image: postgres:16-alpine
restart: unless-stopped
# makes a random database password on the first start, shared with Probyte through the "secrets" volume
entrypoint: ["sh", "-c", "f=/run/probyte/db-password; [ -s $$f ] || { umask 077; head -c 32 /dev/urandom | od -An -tx1 | tr -d ' \\n' > $$f; }; chown 70:70 $$f; exec docker-entrypoint.sh postgres"]
environment:
POSTGRES_USER: probyte
POSTGRES_DB: probyte
POSTGRES_PASSWORD_FILE: /run/probyte/db-password
volumes:
- pgdata:/var/lib/postgresql/data
- secrets:/run/probyte
healthcheck:
test: ["CMD-SHELL", "pg_isready -U probyte -d probyte"]
interval: 3s
timeout: 3s
retries: 20
# Shows Word / PowerPoint files page by page in files tables. Not needed? Delete these lines.
office:
logging: *logging
image: mpgithubcode/probyte-office:${PROBYTE_VERSION:-latest}
restart: unless-stopped
mem_limit: 1g
volumes:
probyte-data:
pgdata:
secrets: