diff --git a/apps/lychee/README.md b/apps/lychee/README.md new file mode 100644 index 0000000..36e3c7c --- /dev/null +++ b/apps/lychee/README.md @@ -0,0 +1,15 @@ +## First login + +Sign in with the username **admin** and the **Admin password** from the app's Overview tab. Then open **Profile** from the menu to change the username or password if you like. + +## Your first album + +Choose the upload button in the top bar to add photos, or create an album first and upload into it. Each album has its own sharing settings: keep it private, make it public, protect it with a password, or share a link with people who don't have an account. + +Add accounts for family and friends under **Users**, and choose whether each one may upload. + +Outbound mail ports are blocked on Cottage, so Lychee's email notifications about new photos won't be sent. + +## Export your data + +Any album or photo can be downloaded from its menu, as the original files. Cottage also keeps nightly backups of the whole app, photos included. diff --git a/apps/lychee/cottage.yml b/apps/lychee/cottage.yml new file mode 100644 index 0000000..56c4a1d --- /dev/null +++ b/apps/lychee/cottage.yml @@ -0,0 +1,14 @@ +name: Lychee +tagline: A calm, good-looking home for your photos and the albums you share. +category: Photos +description: >- + Upload photos into albums, keep them private or share them with a link or a + password, and browse everything in a fast, full-screen gallery. Lychee reads + EXIF details, shows photos on a map and gives friends their own accounts. +upstream: https://github.com/LycheeOrg/Lychee +website: https://lycheeorg.dev +license: MIT +images: + - ref: ghcr.io/lycheeorg/lychee:v7.13.1 + digest: sha256:836e3bb22f02295180b92d382191954845df9993bb73f81e71d394bf0dd0ece1 +mobile_apps: false diff --git a/apps/lychee/icon.svg b/apps/lychee/icon.svg new file mode 100644 index 0000000..970e4b0 --- /dev/null +++ b/apps/lychee/icon.svg @@ -0,0 +1 @@ + diff --git a/apps/lychee/template.yml b/apps/lychee/template.yml new file mode 100644 index 0000000..0faeec7 --- /dev/null +++ b/apps/lychee/template.yml @@ -0,0 +1,60 @@ +# Lychee: a photo gallery for sharing albums, with SQLite. +x-harbor: + slug: lychee + name: Lychee + description: Self-hosted photo management and sharing. + version: "7.13.1-c1" + primary: { service: app, port: 8000 } + health_path: /up + default_resources: { cpu_millis: 500, memory_mb: 768, storage_mb: 20480 } + min_resources: { cpu_millis: 250, memory_mb: 384, storage_mb: 2048 } + volumes: + uploads: { uid: 33, gid: 33, mode: "0755" } + database: { uid: 33, gid: 33, mode: "0750" } + parameters: + - { key: APP_KEY, label: Encryption key, type: string, secret: true, generate: hex32 } + - { key: ADMIN_PASSWORD, label: Admin password, type: string, secret: true, generate: random16 } + +services: + app: + image: ghcr.io/lycheeorg/lychee:v7.13.1 + # www-data in the image. + user: "33:33" + # The image's entrypoint chowns files and drops privileges with gosu, which + # a non-root container can't do. Run the same start-up steps directly: + # migrate, cache config, create the admin once, then start Octane. + entrypoint: [ "/bin/sh", "-c" ] + command: + - | + set -e + touch /var/lib/lychee/lychee.sqlite + cd /app/public/uploads && mkdir -p import medium medium2x original small small2x thumb thumb2x tracks && cd /app + php artisan migrate --force + php artisan config:cache + php artisan route:cache + php artisan view:cache + if [ ! -f /var/lib/lychee/.admin-created ]; then + php artisan lychee:create_user admin "$$ADMIN_PASSWORD" + # As the web installer does: make this admin the gallery's owner. + php -r "(new PDO('sqlite:/var/lib/lychee/lychee.sqlite'))->exec(\"UPDATE configs SET value = (SELECT id FROM users WHERE username = 'admin') WHERE key = 'owner_id'\");" + touch /var/lib/lychee/.admin-created + fi + exec php artisan octane:start --server=frankenphp --host=0.0.0.0 --port=8000 + environment: + APP_KEY: ${APP_KEY} + APP_URL: ${HARBOR_PUBLIC_URL} + APP_ENV: production + TRUSTED_PROXIES: "*" + DB_CONNECTION: sqlite + DB_DATABASE: /var/lib/lychee/lychee.sqlite + ADMIN_PASSWORD: ${ADMIN_PASSWORD} + # FrankenPHP keeps its own state under XDG paths; the image's are root-owned. + XDG_CONFIG_HOME: /tmp/xdg-config + XDG_DATA_HOME: /tmp/xdg-data + volumes: + - "uploads:/app/public/uploads" + - "database:/var/lib/lychee" + +volumes: + uploads: + database: