===== Lychee on Debian Bullseye =====
* https://github.com/LycheeOrg/Lychee
* https://lycheeorg.github.io/docs/installation.html
* [[https://blog.fluxcoil.net/posts/2021/09/containers-for-selfhosters/|My blogpost on this]]
### Install deps
apt install git-core php-bcmath php-ctype php-exif php-fileinfo \
php-gd php-json php-mbstring php-pdo php-tokenizer php-xml \
php-zip php php-fpm php-sqlite3 php-intl php-pgsql \
nginx sudo composer nvi
### Optinonally, if you want to use Postgresql (default is sqlite)
apt install postgresql
sudo -u postgres bash
# Create user, will ask for password
createuser -P -s -e chris2
createdb -O chris2 lychee2
# Verify network access
psql -h 127.0.0.1 -U chris2 lychee2
### Installation
git clone https://www.github.com/LycheeOrg/Lychee /var/www/html/Lychee
# or, get release
cd /var/www/html/
wget https://github.com/LycheeOrg/Lychee/releases/download/v4.3.4/Lychee.zip
mv Lychee-* Lychee
### Lychee configuration
chown -R www-data:www-data /var/www
usermod -s /bin/bash www-data
su - www-data
cd /var/www/html/Lychee
composer install --no-dev
cp .env.example .env
php artisan key:generate
exit
usermod -s /bin/false www-data
### Nginx configuration
vi /etc/nginx/sites-enabled/default
# template from https://lycheeorg.github.io/docs/installation.html
# also add this:
# client_max_body_size 100m;
# also ensure this is set:
# index index.php;
# root /var/www/html/Lychee/public/;
systemctl restart nginx
Then:
* Access http://your-systems-ip
* click through the installer, once done, click the first of the 5 symbols, "home"
* create a user
===== Lychee container building/transfer =====
* https://lycheeorg.github.io/docs/docker.html
* https://crunchtools.com/moving-linux-services-to-containers/
# build locally
podman build -t lychee lychee-build-bullseye/
# run locally
podman run -p 8080:80 --name lychee -d \
-v /mnt/store/2016_japan_move/raw/:/importme:Z,ro \
localhost/lychee /entryscript.sh
# access 127.0.0.1:8080
# complete installation, create user, then
podman commit lychee lychee2
podman push lychee2 docker-archive:lychee2
# on destination system
podman pull docker-archive:lychee2
podman run -p 8080:80 --name lychee \
-d -v /mnt/store/2016_japan_move/raw/:/importme:Z,ro \
localhost/lychee /entryscript.sh
===== Lychee sqlite hints =====
apt install sqlite3
sqlite3 database/database.sqlite .dump >dump.sql # export to sql
sqlite3 database/database.sqlite .read
===== Todo =====
* complete the setup procedure:
* creation of new container
* import album
* run "fixer.sh"
* cut down permissions
* transfer to fc
* find a good place to store the scripts
* migrate an example album