-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.standalone.yml
More file actions
87 lines (83 loc) · 2.74 KB
/
Copy pathdocker-compose.standalone.yml
File metadata and controls
87 lines (83 loc) · 2.74 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# docker-compose for plex-postgresql standalone (plexinc/pms-docker)
#
# Usage:
# docker compose -f docker-compose.standalone.yml up -d
services:
postgres:
image: postgres:15-alpine
container_name: plex-postgres
environment:
POSTGRES_USER: plex
POSTGRES_PASSWORD: plex
POSTGRES_DB: plex
volumes:
- postgres_data:/var/lib/postgresql/data
- postgres_socket:/var/run/postgresql
command: >
postgres
-c shared_buffers=256MB
-c work_mem=16MB
-c maintenance_work_mem=128MB
-c unix_socket_directories=/var/run/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U plex"]
interval: 5s
timeout: 5s
retries: 5
networks:
- plex-network
plex:
build:
context: .
dockerfile: Dockerfile.standalone
container_name: plex-postgresql-standalone
environment:
- TZ=Europe/Amsterdam
- PLEX_CLAIM=${PLEX_CLAIM:-}
# PostgreSQL via TCP (default)
- PLEX_PG_HOST=postgres
- PLEX_PG_PORT=5432
# For Unix socket mode, set PLEX_PG_HOST=/var/run/postgresql
- PLEX_PG_DATABASE=${PLEX_PG_DATABASE:-plex}
- PLEX_PG_USER=plex
- PLEX_PG_PASSWORD=plex
- PLEX_PG_SCHEMA=plex
- PLEX_PG_POOL_SIZE=50
- PLEX_PG_POOL_MAX=100
# - PLEX_PG_IDLE_TIMEOUT=300
# Translator output validation: off|sample|all (default off)
- PLEX_PG_VALIDATE_OUTPUT=${PLEX_PG_VALIDATE_OUTPUT:-off}
- PLEX_PG_VALIDATE_OUTPUT_SAMPLE_PCT=${PLEX_PG_VALIDATE_OUTPUT_SAMPLE_PCT:-5}
# Optional ARM override for OpenSSL CPU feature probing in some VMs/containers
# - PLEX_PG_OPENSSL_ARMCAP=0
- PLEX_PG_LOG_LEVEL=DEBUG
- PLEX_PG_ENABLE_SIGNAL_LOG=1
- PLEX_PG_TRACE_LOADONE=1
- PLEX_PG_LOG_FILE=/config/Library/Application Support/Plex Media Server/Logs/plex_redirect_pg.log
# Clear log file on startup to avoid stale errors
- PLEX_PG_LOG_TRUNCATE_ON_START=1
volumes:
- plex_config:/config
- postgres_socket:/var/run/postgresql
# Media mount (default: local fixtures). Override in .env:
# PLEX_MEDIA_PATH=/absolute/path/to/your/real/media
- "${PLEX_MEDIA_PATH:-./fixtures/media}:/media:ro"
# Source Plex database for migration (optional, mount read-only)
# - "${HOME}/Library/Application Support/Plex Media Server/Plug-in Support/Databases:/source-db:ro"
# Alternative custom media mount:
# - /path/to/media:/media:ro
ports:
- "${PLEX_HOST_PORT:-8083}:32400"
- "${PLEX_HOST_PORT:-8083}:32400/udp"
depends_on:
postgres:
condition: service_healthy
networks:
- plex-network
volumes:
postgres_data:
postgres_socket:
plex_config:
networks:
plex-network:
driver: bridge