http://{cdn.domain.com}/api/upload?url={$url}
{$url} - original file urlhttps://{cdn.domain.com}/api/ping/{$md5}
{$md5} - md5 of full original filehttp://{cdn.domain.com}/api/flush/{$md5}
{$md5} - md5 of full original filehttps://{cdn.domain.com}/f/{$md5}.{$ext}
https://{cdn.domain.com}/r/{$width}x{$height}/{$md5}.{$ext}?hex={$hex}
https://{cdn.domain.com}/r/{$width}x/{$md5}.{$ext}?hex={$hex}
https://{cdn.domain.com}/r/x{$height}/{$md5}.{$ext}?hex={$hex}
https://{cdn.domain.com}/r/{$width}/{$md5}.{$ext}?hex={$hex}
{$width} - resized image width{$height} - resized image height{$md5} - md5 of full original file{$ext} - extension of original file{hex} - background color, 6 digits, without #Storage Box: https://robot.hetzner.com/storage
onpassword. Remember: server_url and usernameport - can be 23server_url in browser with basic auth and see files.mkdir -p /home/arbddocker-compose.yml volume, using vieux/sshfs docker pluginCopy docker-compose.yml.prod.dist and change fields for Production Env.
Run on host machine (not docker inside):
apt update && apt install -y sshfs
nano /etc/fuse.conf
# IMPORTANT: UNCOMMENT user_allow_other line (php -> mount folder permission issue)
# Allow non-root users to specify the allow_other or allow_root mount options.
user_allow_other
nano docker-compose.yml
# Also check your docker-compose.yml for option -> allow_other: '',
# should be included to volume driver_opts
volumes:
sshfs:
driver: vieux/sshfs
driver_opts:
allow_other: ''
sshcmd: {USERNAME}@u441936.your-storagebox.de:/home/arbd
password: {PASSWORD}
port: 23
Copy docker-compose.yml.local.dist and change fields for Local Env.
Don't use any external volumes and storages. Just local volumes mapping:
volumes:
- './:/var/www/media'
- './public/hetzner:/hetzner'
Almost all path constants are defined in App\Services\Lookup class.
Change them if needed, and sync with docker-compose.yml volumes.
Main MOUNT PATH constant is ROOT_PATH:
ROOT_PATH = '/hetzner';
<?php
namespace App\Services;
class Lookup
{
public const FONT_FILENAME = 'fonts/Roboto-Light.ttf';
public const ROOT_PATH = '/hetzner';
public const UPLOADS_PATH = 'uploads';
public const FULL_PATH = 'full';
public const THUMBS_PATH = 'thumbs';
public const DEFAULT_HEX = 'ffffff';
...