forked from DragosOnisei/FrameComment
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
160 lines (154 loc) · 5.26 KB
/
Copy pathdocker-compose.yml
File metadata and controls
160 lines (154 loc) · 5.26 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# FrameComment Docker Compose Configuration
# Video Review & Approval Platform for Filmmakers
#
# Quick Start:
# 1. Copy .env.example to .env and configure your settings
# 2. Run: docker-compose up -d
# 3. Access: http://localhost:4321 (or your configured APP_PORT)
# 4. Login with your ADMIN_EMAIL and ADMIN_PASSWORD from .env
#
# Documentation: https://github.com/DragosOnisei/FrameComment
services:
postgres:
image: postgres:18-alpine
container_name: framecomment-postgres
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-framecomment}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}
POSTGRES_DB: ${POSTGRES_DB:-framecomment}
POSTGRES_INITDB_ARGS: "--encoding=UTF8 --locale=C"
# Postgres 18+ defaults PGDATA to /var/lib/postgresql/<major>/docker.
# Pin it to the legacy path so existing /var/lib/postgresql/data mounts
# keep working out of the box (matches our compose file).
PGDATA: /var/lib/postgresql/data
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- framecomment-internal
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-framecomment}"]
interval: 10s
timeout: 5s
retries: 5
security_opt:
- no-new-privileges:true
redis:
image: redis:8-alpine
container_name: framecomment-redis
restart: unless-stopped
command: redis-server --appendonly yes --requirepass ${REDIS_PASSWORD:?REDIS_PASSWORD is required}
volumes:
- redis-data:/data
networks:
- framecomment-internal
healthcheck:
test: ["CMD", "redis-cli", "--no-auth-warning", "-a", "${REDIS_PASSWORD}", "ping"]
interval: 10s
timeout: 5s
retries: 5
security_opt:
- no-new-privileges:true
app:
image: dragosonisei/framecomment:latest
container_name: framecomment-app
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
environment:
NODE_ENV: production
TZ: ${TZ:-UTC}
PUID: ${PUID:-1000}
PGID: ${PGID:-1000}
DATABASE_URL: postgresql://${POSTGRES_USER:-framecomment}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-framecomment}?schema=public
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: ${REDIS_PASSWORD}
STORAGE_ROOT: /app/uploads
ADMIN_EMAIL: ${ADMIN_EMAIL:?ADMIN_EMAIL is required in .env file}
ADMIN_PASSWORD: ${ADMIN_PASSWORD:?ADMIN_PASSWORD is required in .env file}
ADMIN_NAME: ${ADMIN_NAME:-Admin}
ENCRYPTION_KEY: ${ENCRYPTION_KEY:?ENCRYPTION_KEY is required}
JWT_SECRET: ${JWT_SECRET:?JWT_SECRET is required}
JWT_REFRESH_SECRET: ${JWT_REFRESH_SECRET:?JWT_REFRESH_SECRET is required}
SHARE_TOKEN_SECRET: ${SHARE_TOKEN_SECRET:?SHARE_TOKEN_SECRET is required}
HTTPS_ENABLED: ${HTTPS_ENABLED:-false}
# S3-compatible storage (optional, default: local)
STORAGE_PROVIDER: ${STORAGE_PROVIDER:-local}
S3_ENDPOINT: ${S3_ENDPOINT:-}
S3_BUCKET: ${S3_BUCKET:-}
S3_REGION: ${S3_REGION:-us-east-1}
S3_ACCESS_KEY_ID: ${S3_ACCESS_KEY_ID:-}
S3_SECRET_ACCESS_KEY: ${S3_SECRET_ACCESS_KEY:-}
ports:
- "${APP_PORT:-4321}:4321"
volumes:
- uploads:/app/uploads
networks:
- framecomment-internal
security_opt:
- no-new-privileges:true
healthcheck:
test: ["CMD-SHELL", "node -e \"require('http').get('http://localhost:4321/api/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})\""]
interval: 30s
timeout: 10s
retries: 3
start_period: 5m
worker:
image: dragosonisei/framecomment:latest
container_name: framecomment-worker
restart: unless-stopped
command: npm run worker
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
app:
condition: service_healthy
environment:
NODE_ENV: production
TZ: ${TZ:-UTC}
PUID: ${PUID:-1000}
PGID: ${PGID:-1000}
# DEBUG_WORKER: "true" # Uncomment for verbose FFmpeg and worker debug logs
DATABASE_URL: postgresql://${POSTGRES_USER:-framecomment}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-framecomment}?schema=public
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: ${REDIS_PASSWORD}
STORAGE_ROOT: /app/uploads
ENCRYPTION_KEY: ${ENCRYPTION_KEY}
JWT_SECRET: ${JWT_SECRET}
JWT_REFRESH_SECRET: ${JWT_REFRESH_SECRET}
# S3-compatible storage (must match app service)
STORAGE_PROVIDER: ${STORAGE_PROVIDER:-local}
S3_ENDPOINT: ${S3_ENDPOINT:-}
S3_BUCKET: ${S3_BUCKET:-}
S3_REGION: ${S3_REGION:-us-east-1}
S3_ACCESS_KEY_ID: ${S3_ACCESS_KEY_ID:-}
S3_SECRET_ACCESS_KEY: ${S3_SECRET_ACCESS_KEY:-}
volumes:
- uploads:/app/uploads
networks:
- framecomment-internal
security_opt:
- no-new-privileges:true
healthcheck:
test: ["CMD-SHELL", "ps aux | grep -v grep | grep -q 'npm run worker' || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 6m
volumes:
postgres-data:
driver: local
redis-data:
driver: local
uploads:
driver: local
networks:
framecomment-internal:
driver: bridge