User Tools

Site Tools


Sidebar

software:lychee

Lychee on Debian Bullseye

### 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:

Lychee container building/transfer

# 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 <dump.sql # import sql
sqlite3 database/database.sqlite

.tables
.schema photos
select * from photos;
update photos set title='20140720_155806_on_patrol' where id='16309316325172';

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
software/lychee.txt · Last modified: 2021/09/15 14:40 by chris