-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
147 lines (139 loc) · 5.18 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
147 lines (139 loc) · 5.18 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
services:
typetype:
image: ghcr.io/priveetee/typetype-beta:latest
ports:
- "${HOST_PORT_WEB_BETA:-18082}:80"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- typetype-server
restart: unless-stopped
typetype-server:
image: ghcr.io/priveetee/typetype-server-beta:latest
ports:
- "${HOST_PORT_SERVER_BETA:-18080}:8080"
env_file: .env
environment:
DATABASE_URL: ${DATABASE_URL:-jdbc:postgresql://postgres:5432/${POSTGRES_DB:-typetype}}
DATABASE_USER: ${DATABASE_USER:-${POSTGRES_USER:-typetype}}
DATABASE_PASSWORD: ${DATABASE_PASSWORD:-${POSTGRES_PASSWORD:-typetype}}
DOWNLOADER_SERVICE_URL: http://typetype-downloader:18093
YOUTUBE_REMOTE_LOGIN_ENABLED: ${YOUTUBE_REMOTE_LOGIN_ENABLED:-false}
YOUTUBE_REMOTE_LOGIN_SERVICE_URL: http://typetype-token:8081
YOUTUBE_REMOTE_LOGIN_CALLBACK_BASE_URL: http://typetype-server:8080
YOUTUBE_REMOTE_LOGIN_INTERNAL_TOKEN: ${YOUTUBE_REMOTE_LOGIN_INTERNAL_TOKEN:-}
YOUTUBE_REMOTE_LOGIN_TTL_MS: ${YOUTUBE_REMOTE_LOGIN_TTL_MS:-480000}
YOUTUBE_REMOTE_LOGIN_MAX_SESSIONS: ${YOUTUBE_REMOTE_LOGIN_MAX_SESSIONS:-2}
YOUTUBE_REMOTE_LOGIN_MAX_FRAME_BYTES: ${YOUTUBE_REMOTE_LOGIN_MAX_FRAME_BYTES:-524288}
depends_on:
postgres-init:
condition: service_completed_successfully
dragonfly:
condition: service_started
typetype-token:
condition: service_started
typetype-downloader:
condition: service_started
restart: unless-stopped
typetype-downloader:
image: ghcr.io/priveetee/typetype-downloader:latest
ports:
- "${HOST_PORT_DOWNLOADER_BETA:-19093}:18093"
environment:
HTTP_PORT: "18093"
PUBLIC_BASE_URL: /api/downloader
TYPETYPE_API_BASE: http://typetype-server:8080
DB_URL: ${DB_URL:-postgres://${POSTGRES_USER:-typetype}:${POSTGRES_PASSWORD:-typetype}@postgres:5432/typetype_downloader?sslmode=disable}
DB_USER: ${DB_USER:-${POSTGRES_USER:-typetype}}
DB_PASSWORD: ${DB_PASSWORD:-${POSTGRES_PASSWORD:-typetype}}
REDIS_HOST: dragonfly
REDIS_PORT: "6379"
REDIS_QUEUE_KEY: downloader:queue
MAX_CONCURRENT_WORKERS: "2"
MAX_QUEUE_SIZE: "100"
JOB_TTL_SECONDS: "600"
DOWNLOAD_WORKERS: "8"
DOWNLOAD_CHUNK_SIZE: "10485760"
DOWNLOAD_RANGE_MODE: query
MUXER: avformat
STORAGE_BACKEND: s3
S3_ENDPOINT: http://garage:3900
S3_PUBLIC_ENDPOINT: ${DOWNLOADER_S3_PUBLIC_ENDPOINT:-}
S3_REGION: garage
S3_BUCKET: typetype-downloads
S3_ACCESS_KEY: ${DOWNLOADER_S3_ACCESS_KEY}
S3_SECRET_KEY: ${DOWNLOADER_S3_SECRET_KEY}
S3_ARTIFACT_TTL_SECONDS: "7200"
depends_on:
postgres-init:
condition: service_completed_successfully
dragonfly:
condition: service_started
garage:
condition: service_started
typetype-token:
condition: service_started
restart: unless-stopped
typetype-token:
image: ghcr.io/priveetee/typetype-token-beta:latest
ports:
- "${HOST_PORT_TOKEN_BETA:-18081}:8081"
init: true
ipc: host
environment:
NODE_ENV: production
YOUTUBE_REMOTE_LOGIN_ENABLED: ${YOUTUBE_REMOTE_LOGIN_ENABLED:-false}
YOUTUBE_REMOTE_LOGIN_INTERNAL_TOKEN: ${YOUTUBE_REMOTE_LOGIN_INTERNAL_TOKEN:-}
YOUTUBE_REMOTE_LOGIN_CALLBACK_ORIGIN: ${YOUTUBE_REMOTE_LOGIN_CALLBACK_ORIGIN:-http://typetype-server:8080}
YOUTUBE_REMOTE_LOGIN_MAX_SESSIONS: ${YOUTUBE_REMOTE_LOGIN_MAX_SESSIONS:-2}
YOUTUBE_REMOTE_LOGIN_FRAME_FPS: ${YOUTUBE_REMOTE_LOGIN_FRAME_FPS:-10}
YOUTUBE_REMOTE_LOGIN_MAX_FRAME_BYTES: ${YOUTUBE_REMOTE_LOGIN_MAX_FRAME_BYTES:-524288}
restart: unless-stopped
postgres:
image: postgres:17
environment:
POSTGRES_DB: ${POSTGRES_DB:-typetype}
POSTGRES_USER: ${POSTGRES_USER:-typetype}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-typetype}
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
postgres-init:
image: postgres:17
depends_on:
postgres:
condition: service_started
environment:
POSTGRES_DB: ${POSTGRES_DB:-typetype}
POSTGRES_USER: ${POSTGRES_USER:-typetype}
PGPASSWORD: ${POSTGRES_PASSWORD:-typetype}
command:
- /bin/sh
- -ec
- |
until pg_isready -h postgres -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"; do sleep 1; done
EXISTS=$$(psql -h postgres -U "$$POSTGRES_USER" -d "$$POSTGRES_DB" -tAc "SELECT 1 FROM pg_database WHERE datname='typetype_downloader'")
if [ "$$EXISTS" != "1" ]; then
psql -h postgres -U "$$POSTGRES_USER" -d "$$POSTGRES_DB" -c "CREATE DATABASE typetype_downloader"
fi
restart: "no"
dragonfly:
image: docker.dragonflydb.io/dragonflydb/dragonfly:latest
ulimits:
memlock: -1
restart: unless-stopped
garage:
image: dxflrs/garage:v2.2.0
ports:
- "${HOST_PORT_GARAGE_S3_BETA:-3900}:3900"
environment:
GARAGE_RPC_SECRET: ${GARAGE_RPC_SECRET:-}
volumes:
- ./garage.toml:/etc/garage.toml:ro
- garage_meta:/var/lib/garage/meta
- garage_data:/var/lib/garage/data
restart: unless-stopped
volumes:
postgres_data:
garage_meta:
garage_data: