-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
87 lines (73 loc) · 2.47 KB
/
docker-compose.yml
File metadata and controls
87 lines (73 loc) · 2.47 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
version: '3.8'
services:
obsidian-web:
build: .
container_name: obsidian-web
ports:
- "${PORT:-8080}:8080"
volumes:
# Mount your Obsidian vault (read-only recommended)
# Change the left side to point to your actual vault directory
- /path/to/your/vault:/data/vault:ro
# Persistent storage for database and indexes
- obsidian-data:/data
environment:
# Server configuration
- OBSIDIAN_WEB_SERVER_HOST=0.0.0.0
- OBSIDIAN_WEB_SERVER_PORT=8080
# Database path (inside container)
- OBSIDIAN_WEB_DATABASE_PATH=/data/app.db
# Logging configuration
- OBSIDIAN_WEB_LOG_LEVEL=${LOG_LEVEL:-info}
- OBSIDIAN_WEB_LOG_FORMAT=json
# Vault configuration
- OBSIDIAN_WEB_VAULT_PATH=/data/vault
- OBSIDIAN_WEB_INDEX_PATH=/data/indexes/default
# Search configuration
- OBSIDIAN_WEB_SEARCH_DEFAULT_LIMIT=20
- OBSIDIAN_WEB_SEARCH_MAX_LIMIT=100
# Indexing configuration
- OBSIDIAN_WEB_INDEXING_BATCH_SIZE=100
- OBSIDIAN_WEB_INDEXING_AUTO_INDEX=true
# AWS credentials (if using S3 storage)
# Uncomment and set these if you're using S3
# - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
# - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
restart: unless-stopped
# Health check
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
# Named volume for persistent data (database and indexes)
obsidian-data:
driver: local
# Example: Using S3 storage instead of local volume
# Uncomment this service definition and comment out the volume mount above
#
# services:
# obsidian-web-s3:
# build: .
# container_name: obsidian-web-s3
# ports:
# - "8080:8080"
# volumes:
# - obsidian-data:/data
# environment:
# - OBSIDIAN_WEB_SERVER_HOST=0.0.0.0
# - OBSIDIAN_WEB_SERVER_PORT=8080
# - OBSIDIAN_WEB_DATABASE_PATH=/data/app.db
# - OBSIDIAN_WEB_LOG_LEVEL=info
# - OBSIDIAN_WEB_LOG_FORMAT=json
#
# # S3 storage configuration
# # Note: The storage type is set in config file or use a full config mount
# - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
# - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
# - AWS_REGION=${AWS_REGION:-us-east-1}
#
# - OBSIDIAN_WEB_INDEX_PATH=/data/indexes/default
# restart: unless-stopped