forked from MansiVisuals/ViTransfer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.unraid.yml
More file actions
127 lines (122 loc) · 3.96 KB
/
docker-compose.unraid.yml
File metadata and controls
127 lines (122 loc) · 3.96 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
# ViTransfer for Unraid
# See README.md for deployment instructions
services:
postgres:
image: postgres:18-alpine
container_name: vitransfer-postgres
restart: unless-stopped
environment:
POSTGRES_USER: vitransfer
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}
POSTGRES_DB: vitransfer
POSTGRES_INITDB_ARGS: "--encoding=UTF8 --locale=C"
volumes:
- /mnt/user/appdata/vitransfer/postgres:/var/lib/postgresql/data
networks:
- vitransfer-internal
healthcheck:
test: ["CMD-SHELL", "pg_isready -U vitransfer"]
interval: 10s
timeout: 5s
retries: 5
security_opt:
- no-new-privileges:true
redis:
image: redis:8-alpine
container_name: vitransfer-redis
restart: unless-stopped
command: redis-server --appendonly yes --requirepass ${REDIS_PASSWORD:?REDIS_PASSWORD is required}
volumes:
- /mnt/user/appdata/vitransfer/redis:/data
networks:
- vitransfer-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: crypt010/vitransfer:latest
container_name: vitransfer-app
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
environment:
NODE_ENV: production
TZ: ${TZ:-UTC}
PUID: 99
PGID: 100
DATABASE_URL: postgresql://vitransfer:${POSTGRES_PASSWORD}@vitransfer-postgres:5432/vitransfer?schema=public
REDIS_HOST: vitransfer-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}
ports:
- "${APP_PORT:-4321}:4321"
volumes:
- /mnt/user/appdata/vitransfer/uploads:/app/uploads
networks:
- vitransfer-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: crypt010/vitransfer:latest
container_name: vitransfer-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: 99
PGID: 100
# DEBUG_WORKER: "true" # Uncomment for verbose FFmpeg and worker debug logs
DATABASE_URL: postgresql://vitransfer:${POSTGRES_PASSWORD}@vitransfer-postgres:5432/vitransfer?schema=public
REDIS_HOST: vitransfer-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}
SHARE_TOKEN_SECRET: ${SHARE_TOKEN_SECRET}
volumes:
- /mnt/user/appdata/vitransfer/uploads:/app/uploads
networks:
- vitransfer-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
networks:
vitransfer-internal:
driver: bridge