You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 7, 2026. It is now read-only.
@@ -91,9 +90,19 @@ alter user 'lychee' identified with mysql_native_password by '<your password>';
91
90
92
91
### Run with Docker Compose
93
92
94
-
Change the environment variables in the [provided example](./docker-compose.yml) to reflect your database credentials.
93
+
You can take the provided docker-compose.yml example as a start and edit it to enable more configuration variables.
94
+
95
+
Use the `.env.exanple` to create a `.env` at the root of your folder containing your `docker-compose.yml`.
96
+
Populate your database credentials and other environment variables.
97
+
98
+
This `.env` file will be loaded by docker compose and populate environment in the docker container.
99
+
Those will then be injected in the Lychee configuration file (located in e.g. `lychee/config/.env`).
95
100
96
-
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](https://docs.docker.com/compose/environment-variables/#the-env_file-configuration-option)).
:warning: If you later edit your `lychee/config/.env` file, restarting the container will overwrite those variables with the ones provided in your docker-compose `.env` file.
104
+
For this reason it is better to make your changes directly in `docker-compose.yml`/`.env` rather than in `lychee/config/.env` when the values are supported.
105
+
Please refer to the [inject.sh](https://github.com/LycheeOrg/Lychee/blob/master/inject.sh) script for more details.
97
106
98
107
### Create admin account during first run
99
108
@@ -114,7 +123,7 @@ The following _FILE variables are supported:
114
123
115
124
## Available environment variables and defaults
116
125
117
-
If you do not provide environment variables or `.env` file, the[example .env file](https://github.com/LycheeOrg/Lychee/blob/master/.env.example) will be used with some values already set by default.
126
+
If you do not provide environment variables or `.env` file, Lychee's[example .env file](https://github.com/LycheeOrg/Lychee/blob/master/.env.example) will be used with some values already set by default inside the docker container.
118
127
119
128
Some variables are specific to Docker, and the default values are :
120
129
@@ -126,22 +135,6 @@ Some variables are specific to Docker, and the default values are :
126
135
127
136
Additionally, if `SKIP_PERMISSIONS_CHECKS` is set to "yes", the entrypoint script will not check or set the permissions of files and directories on startup. Users are strongly advised **against** using this option, and efforts have been made to keep the checks as fast as possible. Nonetheless, it may be suitable for some advanced use cases.
128
137
129
-
## Advanced configuration
130
-
131
-
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](https://lycheeorg.github.io/docs/faq.html#i-cant-upload-large-photos).
132
-
133
-
You may still want to further customize PHP configuration. The first method is to mount a custom `php.ini` to `/etc/php/8.2/fpm/php.ini` when starting the container. However, this method is kind of brutal as it will override all parameters. It will also need to be remapped whenever an image is released with a new version of PHP.
134
-
135
-
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 :
136
-
137
-
1. Take the [default.conf](./default.conf) file as a base
138
-
2. Find the line starting by `fastcgi_param PHP_VALUE [...]`
139
-
3. Add a new line and set your new parameter
140
-
4. Add or change any other parameters (e.g. `client_max_body_size`)
141
-
5. Mount your new file to `/etc/nginx/nginx.conf`
142
-
143
-
If you need to add (not change) nginx directives, files mounted in `/etc/nginx/conf.d/` will be included in the `http` context.
0 commit comments