Docker Image
Environment variables
The most essentials environments variables are listed below
- CHEVERETO_DB_HOST - Hostname of the Database machine that you wish to connect, default to db
- CHEVERETO_DB_PORT - The port of the Database machine to connect to, default to 3306
- CHEVERETO_DB_USERNAME - Username to authenticate to MySQL database, default to chevereto
- CHEVERETO_DB_PASSWORD - Password of the user when connect to MySQL database, default to chevereto
- CHEVERETO_DB_NAME - Name of the database in MySQL server, default to chevereto
- CHEVERETO_DB_PREFIX - Table prefix (you can use this to run multiple instance of Chevereto using the same Database), default to chv_
For other environment variables, please consult the file settings.php and the section “Advanced configuration” below.
Persistent storage
Chevereto stores images uploaded by users in /var/www/html/images directory within the container.
You can mount a data volume at this location to ensure that you don’t lose your images if you relaunch/remove container.
Max image size
By default, PHP allow a maximum file upload to be 2MB. You can change such behaviour by updating the php.ini in your container, either by bind-mount the file, or build a new image with the updated file, that way you can reuse the image on demand.
Note that by default, Chevereto set a file upload limit of 10MB, so after you modify your php.ini, you should also update this settings in Chevereto settings page (available at CHEVERETO_URL/dashboard/settings/image-upload)
The customized php.ini should set the values of upload_max_filesize, post_max_size and potentially memory_limit, as showed in the discussion from Chevereto Forum. Further details on these parameters are available from PHP documentation
An example of this is available in the examples/bigger-files directory
Standalone
docker run -it --name chevereto -d \ |
docker-compose
version: '3' |
Nginx (使用了bitwarden的nginx)
upstream chevereto { |
php.ini
[PHP] |