-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (48 loc) · 1.85 KB
/
Copy pathdocker-compose.yml
File metadata and controls
50 lines (48 loc) · 1.85 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
services:
app:
build:
context: .
dockerfile: Dockerfile
image: videosphere:latest
container_name: videosphere
restart: unless-stopped
# For SMB backup to LAN NAS/Windows shares (TCP 445) on Linux, uncomment:
# network_mode: host
# With network_mode: host, Compose ignores `ports:` — the app binds on the host (e.g. :9624) directly.
ports:
- '9624:9624'
env_file:
- .env.local
environment:
# NOTE: Compose interpolates ${...} before service env_file is loaded.
# MONGO_ROOT_PASSWORD must be available to Compose itself (shell env,
# a project-level .env, or `docker compose --env-file .env.local ...`).
MONGODB_URI: mongodb://${MONGO_ROOT_USER:-admin}:${MONGO_ROOT_PASSWORD:?required}@mongo:27017/videosphere?authSource=admin
depends_on:
mongo:
condition: service_healthy
# Standalone MongoDB (no replica set). Multi-document transactions are not supported;
# password reset uses ordered writes instead — see docs/password-recovery.md.
mongo:
image: mongo:8
container_name: videosphere-mongo
restart: unless-stopped
ports:
- '127.0.0.1:27017:27017'
environment:
# NOTE: This required interpolation is resolved by Compose (not env_file).
# Ensure MONGO_ROOT_PASSWORD is provided via shell/.env/--env-file.
MONGO_INITDB_ROOT_USERNAME: ${MONGO_ROOT_USER:-admin}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_ROOT_PASSWORD:?required}
MONGO_INITDB_DATABASE: videosphere
volumes:
- mongo-data:/data/db
# Cap WiredTiger cache on memory-constrained hosts (e.g. 4GB Odroid); default is ~50% of (RAM - 1GB).
command: ['mongod', '--wiredTigerCacheSizeGB', '0.5']
healthcheck:
test: ['CMD', 'mongosh', '--eval', "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
volumes:
mongo-data: