# Pure Docker
This is the most basic way to run Chevereto using Docker.
Pure Docker refers to running Chevereto using Docker without the extra provisions of Chevereto Docker (nginx ingress proxy, CloudFlare integration).
# Build image (paid edition)
Image building is recommended for Chevereto paid edition. Skip to Run (free edition) if you are using Chevereto free edition or if you want to upgrade to paid edition within the application itself.
Workaround image building
If you can't build the paid image you can use the free edition image and upgrade to paid within the application itself. To do this, pass the environment CHEVERETO_SERVICING=server
to the container runtime and go to /dashboard?license
to enter the license key and proceed with the upgrading process. You will also need to setup a volume for the application files.
# Clone repository
Clone the chevereto/docker (opens new window) repository and create an .env
file with your license key:
CHEVERETO_LICENSE_KEY=your_license_key
# Make image
Run the following command to create the Chevereto image:
make image
By running the above command you will generate the following tags:
chevereto:latest
chevereto:4
chevereto:4.1
chevereto:4.1.0
# Upgrading
To upgrade your Chevereto application you need to (1) Sync repository, (2) Re-build the container image, and (3) Down and re-up the container.
# Step 1: Sync repository
Sync latest changes from chevereto/docker (opens new window) repository:
make sync
Note: If there's a new branch (for example 4.2) switch to that branch running the following command:
git switch 4.2
# Step 2: Re-build the container image
make image
# Step 3: Down and re-up the container
Down the container:
docker stop --name chevereto
docker rm --name chevereto
Then re-up the container using the same command you used to run it the first time.
# Run (paid edition)
To run chevereto.com (opens new window) (paid edition) you need to pass the environment targeting your private build image, in this example chevereto:latest
.
Note: For running this command you need to fill your own database credentials.
docker run -d \
--name chevereto \
-p 80:80 \
-e CHEVERETO_DB_HOST=database \
-e CHEVERETO_DB_USER=chevereto \
-e CHEVERETO_DB_PASS=user_database_password \
-e CHEVERETO_DB_PORT=3306 \
-e CHEVERETO_DB_NAME=chevereto \
-e CHEVERETO_ASSET_STORAGE_TYPE=local \
-e CHEVERETO_ASSET_STORAGE_URL=/images/_assets/ \
-e CHEVERETO_ASSET_STORAGE_BUCKET=/var/www/html/images/_assets/ \
-e CHEVERETO_MAX_POST_SIZE=2G \
-e CHEVERETO_MAX_UPLOAD_SIZE=2G \
-v /var/www/html/images/ \
chevereto:latest
# Run (free edition)
To run chevereto/chevereto (opens new window) (Chevereto free edition) you need to pass the environment targeting public image ghcr.io/chevereto/chevereto:latest
.
Alternatively, you can pass chevereto/chevereto:latest
which is the Chevereto mirror on DockerHub (opens new window).
Note: For running this command you need to fill your own database credentials.
docker run -d \
--name chevereto \
-p 80:80 \
-e CHEVERETO_DB_HOST=database \
-e CHEVERETO_DB_USER=chevereto \
-e CHEVERETO_DB_PASS=user_database_password \
-e CHEVERETO_DB_PORT=3306 \
-e CHEVERETO_DB_NAME=chevereto \
-e CHEVERETO_ASSET_STORAGE_TYPE=local \
-e CHEVERETO_ASSET_STORAGE_URL=/images/_assets/ \
-e CHEVERETO_ASSET_STORAGE_BUCKET=/var/www/html/images/_assets/ \
-e CHEVERETO_MAX_POST_SIZE=2G \
-e CHEVERETO_MAX_UPLOAD_SIZE=2G \
-e CHEVERETO_SERVICING=server \
-v /var/www/html/images/ \
ghcr.io/chevereto/chevereto:latest
# Run free edition with application upgrade
If you want to run the free edition and manage the application upgrade within the application itself you need to pass -e CHEVERETO_SERVICING=server
and setup a volume for the application files:
Note: For running this command you need to fill your own database credentials.
docker run -d \
--name chevereto \
-p 80:80 \
-e CHEVERETO_DB_HOST=database \
-e CHEVERETO_DB_USER=chevereto \
-e CHEVERETO_DB_PASS=user_database_password \
-e CHEVERETO_DB_PORT=3306 \
-e CHEVERETO_DB_NAME=chevereto \
-e CHEVERETO_ASSET_STORAGE_TYPE=local \
-e CHEVERETO_ASSET_STORAGE_URL=/images/_assets/ \
-e CHEVERETO_ASSET_STORAGE_BUCKET=/var/www/html/images/_assets/ \
-e CHEVERETO_MAX_POST_SIZE=2G \
-e CHEVERETO_MAX_UPLOAD_SIZE=2G \
-e CHEVERETO_SERVICING=server \
-v /var/www/html/images/ \
-v /var/www/html/ \
ghcr.io/chevereto/chevereto:latest
# Using compose
Create your own docker-compose.yml
at your project folder. See more examples at chevereto/docker (opens new window).
services:
database:
image: mariadb:jammy
networks:
- chevereto
volumes:
- database:/var/lib/mysql
restart: always
healthcheck:
test: ["CMD", "healthcheck.sh", "--su-mysql", "--connect"]
interval: 10s
timeout: 5s
retries: 3
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: chevereto
MYSQL_USER: chevereto
MYSQL_PASSWORD: user_database_password
php:
image: chevereto/chevereto:latest # tweak with target image to run
networks:
- chevereto
volumes:
- storage:/var/www/html/images/
# - app:/var/www/html/ # uncomment when using CHEVERETO_SERVICING=server
restart: always
depends_on:
database:
condition: service_healthy
expose:
- 80
environment:
CHEVERETO_DB_HOST: database
CHEVERETO_DB_USER: chevereto
CHEVERETO_DB_PASS: user_database_password
CHEVERETO_DB_PORT: 3306
CHEVERETO_DB_NAME: chevereto
CHEVERETO_HOSTNAME: hostname.com
CHEVERETO_HOSTNAME_PATH: /
CHEVERETO_HTTPS: 0
CHEVERETO_ASSET_STORAGE_TYPE: local
CHEVERETO_ASSET_STORAGE_URL: http://hostname.com/images/_assets/ #hostname-aware URL
CHEVERETO_ASSET_STORAGE_BUCKET: /var/www/html/images/_assets/
CHEVERETO_MAX_POST_SIZE: 2G
CHEVERETO_MAX_UPLOAD_SIZE: 2G
# CHEVERETO_SERVICING: server # uncomment to enable application filesystem upgrades
volumes:
database:
storage:
# app: # uncomment when using CHEVERETO_SERVICING=server
networks:
chevereto:
← Chevereto Docker VPS →