travel-log Svelte Themes

Travel Log

Welcome to my very first Coding Project! I started working on this Svelte-based website as a way to learn more about working Web-Development. Please feel free to contact if you have any tips, recommendations or questions about the project!

travel-log

This Web-Project is designed to document all of your Journeys in one place! 🌍

Development

Enviroment Variables

Variable Description
DATABASE_URL Your Database URL
DATABASE_PASSWORD Your Database Password
IMGPROXY_KEY Your ImgProxy Key (HEX-Format)
IMGPROXY_SALT Your ImgProxy Salt (HEX-Format)
IMGPROXY_URL Your ImgProxy Base URL

Generate Key and Salt

KEY: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
SALT: node -e "console.log(require('crypto').randomBytes(16).toString('hex'))"

Run ImgProxy-Container locally

Windows

docker run 
    -p 8080:8080 ^
    -v {PATH_TO_IMAGE_FOLDER}/pictures:/pictures:ro ^
    -e IMGPROXY_LOCAL_FILESYSTEM_ROOT=/pictures ^
    -e IMGPROXY_KEY={YOUR_KEY} -e IMGPROXY_SALT={YOUR_SALT} ^
    -it ghcr.io/imgproxy/imgproxy:latest ^

Linux

docker run
    -p 8080:8080 \
    -v {PATH_TO_IMAGE_FOLDER}/pictures:/pictures:ro \
    -e IMGPROXY_LOCAL_FILESYSTEM_ROOT=/pictures \
    -e IMGPROXY_KEY={YOUR_KEY} -e IMGPROXY_SALT={YOUR_SALT} \
    -it ghcr.io/imgproxy/imgproxy:latest \

Any Image Path that you try to sign and fetch with the getImgProxyURL() function must be relative to {PATH_TO_IMAGE_FOLDER}!

import { getImgProxyURL } from '$src/lib/imgproxy';

Top categories

Loading Svelte Themes