-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocker-compose.local.yml
More file actions
77 lines (73 loc) · 2.5 KB
/
docker-compose.local.yml
File metadata and controls
77 lines (73 loc) · 2.5 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
# =============================================================================
# Infrastructure-Only Docker Compose - Local Development (No Docker IO)
# Only PostgreSQL and Redis run in Docker
# Frontend (webapp) and Backend (hocuspocus.server) run natively on host
#
# Use this on macOS to avoid Docker IO performance issues
#
# USAGE:
# docker-compose -f docker-compose.local.yml up -d
# docker-compose -f docker-compose.local.yml down
# =============================================================================
services:
# ---------------------------------------------------------------------------
# PostgreSQL Database
# ---------------------------------------------------------------------------
postgres:
image: postgres:17-alpine
container_name: docsy-postgres-local
restart: unless-stopped
environment:
POSTGRES_DB: docsplus
POSTGRES_USER: ${DB_USER:-docsplus}
POSTGRES_PASSWORD: ${DB_PASSWORD:-CHANGE_ME_STRONG_PASSWORD}
POSTGRES_INITDB_ARGS: '-E UTF8 --locale=C'
ports:
- '${DB_PORT:-5432}:5432'
volumes:
- postgres_data_local:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${DB_USER:-docsplus}']
interval: 5s
timeout: 3s
retries: 3
start_period: 5s
networks:
- docsy-network-local
# ---------------------------------------------------------------------------
# Redis Cache & Pub/Sub
# ---------------------------------------------------------------------------
redis:
image: redis:alpine
container_name: docsy-redis-local
restart: unless-stopped
command: redis-server --appendonly yes --maxmemory 512mb --maxmemory-policy noeviction
ports:
- '${REDIS_PORT:-6379}:6379'
volumes:
- redis_data_local:/data
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 3s
timeout: 2s
retries: 3
start_period: 3s
networks:
- docsy-network-local
# =============================================================================
# Volumes
# =============================================================================
volumes:
postgres_data_local:
driver: local
name: docsy-postgres-local
redis_data_local:
driver: local
name: docsy-redis-local
# =============================================================================
# Networks
# =============================================================================
networks:
docsy-network-local:
driver: bridge
name: docsy-network-local