Sign inSign up

lycheeorg/lychee-laravel

By lycheeorg

•Updated 9 months ago

https://github.com/LycheeOrg/Lychee

Image
Security
Languages & frameworks
Content management system
4

500K+

lycheeorg/lychee-laravel repository overview

⁠Notice: This Dockerhub repository has been migrated to lycheeorg/lychee⁠

Build Status Docker Pulls (old) Docker Pulls (new) Release Last Commit

Supports amd64 Architecture Supports aarch64 Architecture Supports armv6 Architecture Supports armv7 Architecture

alt text

⁠Source Code

Lychee-Laravel⁠
Docker Image⁠

⁠Table of Contents

⁠Image Content

This image features Lychee, nginx and PHP-FPM. The provided configuration (PHP, nginx...) follows Lychee's official recommendations.

The following tags are available :

  • latest: Latest Lychee release
  • v[NUMBER]: Stable version tag for a Lychee release
  • dev: Current master branch tag (Lychee operates on a stable master, so this should usually be safe)
  • testing: Tag for testing new branches and pull requests. Designed for internal use by LycheeOrg.

⁠Setup

⁠Quick Start

To use the built-in SQLite support, no external dependencies are required. At its simplest, docker run -p 80 lycheeorg/lychee:dev will start Lychee listening on a random port on the local host.

For more runtime options, look below in Run with Docker⁠ and Available environment variables and defaults⁠.

⁠Prerequisites

To use this image with MySQL, MariaDB or PostgreSQL you will need a suitable database running externally. This may be through a Docker image, possibly in your docker-compose.yml.

  1. Create the db, username, password.
  2. Edit the environment variables (db credentials, language...) by :
    • Supplying the environment variables via docker run / docker-compose, or
    • Creating a .env file with the appropriate info and mount it to /conf/.env.
⁠Run with Docker

Make sure that you link to the container running your database !!

The example below shows --net and --link for these purposes. --net connects to the name of the network your database is on and --link connects to the database container.

docker run -d \
--name=lychee \
-v /host_path/lychee/conf:/conf \
-v /host_path/lychee/uploads:/uploads \
-v /host_path/lychee/sym:/sym \
-e PUID=1000 \
-e PGID=1000 \
-e PHP_TZ=America/New_York \
-e DB_CONNECTION=mysql \
-e DB_HOST=mariadb \
-e DB_PORT=3306 \
-e DB_DATABASE=lychee \
-e DB_USERNAME=user \
-e DB_PASSWORD=password \
-p 90:80 \
--net network_name \
--link db_name \
lycheeorg/lychee

Warning : if you use a MySQL database, make sure to use the mysql_native_password authentication plugin, either by using the --default-authentication-plugin option when starting mysql, or by running a query to enable the authentication plugin for the lychee user, e.g. :

alter user 'lychee' identified with mysql_native_password by '<your password>';
⁠Run with Docker Compose

Change the environment variables in the provided example⁠ to reflect your database credentials.

Note that in order to avoid writing credentials directly into the file, you can create a db_secrets.env and use the env_file directive (see the docs⁠).

⁠Available environment variables and defaults

If you do not provide environment variables or .env file, the example .env file⁠ will be used with some values already set by default.

Some variables are specific to Docker, and the default values are :

  • PUID=1000
  • PGID=1000
  • USER=lychee
  • PHP_TZ=UTC
  • STARTUP_DELAY=0

⁠Advanced configuration

Note that nginx will accept by default images up to 100MB (client_max_body_size 100M) and that PHP parameters are overridden according to the recommendations of the Lychee FAQ⁠.

You may still want to further customize PHP configuration. The first method is to mount a custom php.ini to /etc/php/7.3/fpm/php.ini when starting the container. However, this method is kind of brutal as it will override all parameters.

Instead, we recommend to use the PHP_VALUE directive of PHP-FPM to override specific parameters. To do so, you will need to mount a custom nginx.conf in your container :

  1. Take the default.conf⁠ file as a base
  2. Find the line starting by fastcgi_param PHP_VALUE [...]
  3. Add a new line and set your new parameter
  4. Mount your new file to /etc/nginx/nginx.conf

Tag summary

Content type

Image

Digest

sha256:4a695e81c…

Size

424.4 MB

Last updated

10 months ago

docker pull lycheeorg/lychee-laravel