mirror of
https://github.com/Lolendor/reVCDOS.git
synced 2026-10-10 03:43:12 +08:00
19edc9df14
Add support for serving assets from packed binary archives with brotli compression.
New features:
- `packer_brotli.py`: Pack vcsky/vcbr folders into single .bin archive with brotli compression (quality 11)
- `downloader_brotli.py`: Stream unpack archives during download
- `--packed` flag: Serve files directly from archive (supports local files and URLs)
- `--unpacked` flag: Extract archive to `unpacked/{hash}/` and serve from there
- `--vcsky_local` / `--vcbr_local`: Now accept optional custom paths
- MD5 hash detection: Pass existing folder hash directly to `--unpacked`
- `--pack` for packing
Archive format:
- ULEB128 length encoding for compact size
- Folder/file deduplication (identical content stored once)
- Parallel compression with ProcessPoolExecutor
and much more, like ?configurable=1
and auto language detection fix, ...
42 lines
1.8 KiB
YAML
42 lines
1.8 KiB
YAML
services:
|
|
revcdos:
|
|
hostname: reVCDOS
|
|
build:
|
|
context: .
|
|
dockerfile: docker/Dockerfile
|
|
ports:
|
|
- "${OUT_HOST-0.0.0.0}:${OUT_PORT-8000}:${IN_PORT-8000}"
|
|
volumes:
|
|
- .:/app
|
|
networks:
|
|
- default
|
|
environment:
|
|
- AUTH_LOGIN=${AUTH_LOGIN:-}
|
|
- AUTH_PASSWORD=${AUTH_PASSWORD:-}
|
|
- CUSTOM_SAVES=${CUSTOM_SAVES:-}
|
|
- IN_PORT=${IN_PORT:-8000}
|
|
- VCSKY_LOCAL=${VCSKY_LOCAL:-}
|
|
- VCBR_LOCAL=${VCBR_LOCAL:-}
|
|
- VCSKY_URL=${VCSKY_URL:-}
|
|
- VCBR_URL=${VCBR_URL:-}
|
|
- VCSKY_CACHE=${VCSKY_CACHE:-}
|
|
- VCBR_CACHE=${VCBR_CACHE:-}
|
|
- PACKED=${PACKED:-}
|
|
- UNPACKED=${UNPACKED:-}
|
|
- PACK=${PACK:-}
|
|
command: >
|
|
sh -c "python server.py
|
|
--port $${IN_PORT:-8000}
|
|
$$([ -n \"$$AUTH_LOGIN\" ] && [ -n \"$$AUTH_PASSWORD\" ] && echo \"--login $$AUTH_LOGIN --password $$AUTH_PASSWORD\" || echo '')
|
|
$$([ \"$$CUSTOM_SAVES\" = '1' ] && echo '--custom_saves' || echo '')
|
|
$$(if [ \"$$VCSKY_LOCAL\" = '1' ]; then echo '--vcsky_local'; elif [ -n \"$$VCSKY_LOCAL\" ]; then echo \"--vcsky_local $$VCSKY_LOCAL\"; fi)
|
|
$$(if [ \"$$VCBR_LOCAL\" = '1' ]; then echo '--vcbr_local'; elif [ -n \"$$VCBR_LOCAL\" ]; then echo \"--vcbr_local $$VCBR_LOCAL\"; fi)
|
|
$$([ -n \"$$VCSKY_URL\" ] && echo \"--vcsky_url $$VCSKY_URL\" || echo '')
|
|
$$([ -n \"$$VCBR_URL\" ] && echo \"--vcbr_url $$VCBR_URL\" || echo '')
|
|
$$([ \"$$VCSKY_CACHE\" = '1' ] && echo '--vcsky_cache' || echo '')
|
|
$$([ \"$$VCBR_CACHE\" = '1' ] && echo '--vcbr_cache' || echo '')
|
|
$$([ -n \"$$PACKED\" ] && echo \"--packed $$PACKED\" || echo '')
|
|
$$([ -n \"$$UNPACKED\" ] && echo \"--unpacked $$UNPACKED\" || echo '')
|
|
$$([ -n \"$$PACK\" ] && echo \"--pack $$PACK\" || echo '')"
|
|
restart: unless-stopped
|