mirror of
https://github.com/Gurkengewuerz/nitro-docker.git
synced 2024-11-23 00:20:52 +01:00
feat: add image proxy for youtube thumbnails etc.
This commit is contained in:
parent
53f03b3f56
commit
a7d9a8bab9
4
.env
4
.env
@ -27,3 +27,7 @@ AVATAR_FIGUREMAP_URL=http://assets/assets/gamedata/FigureMap.json
|
||||
AVATAR_EFFECTMAP_URL=http://assets/assets/gamedata/EffectMap.json
|
||||
AVATAR_ASSET_URL=http://assets/assets/bundled/figure/%libname%.nitro
|
||||
AVATAR_ASSET_EFFECT_URL=http://assets/assets/bundled/effect/%libname%.nitro
|
||||
|
||||
IMAGEPROXY_USER_AGENT="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
|
||||
IMAGEPROXY_ADDR=0.0.0.0:8080
|
||||
IMAGEPROXY_CACHE=/tmp/imageproxy
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -8,4 +8,5 @@ assets/translation/*.sql
|
||||
assets/swf
|
||||
assets/usercontent/**/*.png
|
||||
~$*.xlsx
|
||||
export/
|
||||
export/
|
||||
assets/usercontent/imageproxy/
|
@ -80,6 +80,8 @@ UPDATE emulator_settings SET `value`='/app/assets/usercontent/badgeparts/' WHERE
|
||||
|
||||
UPDATE emulator_settings SET `value`='/app/assets/swf/c_images/Badgeparts' WHERE `key`='imager.location.badgeparts';
|
||||
|
||||
UPDATE emulator_settings SET `value`='http://127.0.0.1:8080/api/imageproxy/0x0/http://img.youtube.com/vi/%video%/default.jpg' WHERE `key`='imager.url.youtube';
|
||||
|
||||
UPDATE emulator_settings SET `value`='0' WHERE `key`='console.mode';
|
||||
```
|
||||
|
||||
|
@ -35,6 +35,10 @@ server {
|
||||
return 403;
|
||||
}
|
||||
|
||||
location ^~ /api/imageproxy/ {
|
||||
proxy_pass http://imgproxy:8080/;
|
||||
}
|
||||
|
||||
location ~* (.*/thumbnail)/(.+\.png)$ {
|
||||
# kill cache
|
||||
expires -1;
|
||||
|
12
compose.yaml
12
compose.yaml
@ -104,5 +104,17 @@ services:
|
||||
restart: unless-stopped
|
||||
networks: [nitro]
|
||||
|
||||
imgproxy:
|
||||
image: ghcr.io/willnorris/imageproxy
|
||||
depends_on:
|
||||
# proxied through nginx of assets
|
||||
- assets
|
||||
volumes:
|
||||
- "./assets/usercontent/imageproxy/cache:/tmp/imageproxy"
|
||||
env_file:
|
||||
- .env
|
||||
restart: unless-stopped
|
||||
networks: [nitro]
|
||||
|
||||
networks:
|
||||
nitro:
|
||||
|
Loading…
Reference in New Issue
Block a user