# ๐Ÿ‹ Docker

TIP

This is the best way to deploy Chevereto.

Docker refers to container technology, in this context you don't need to worry about PHP versioning, missing extensions, virtual host configuration, database server, anything. This is the best way to deploy Chevereto as the software infrastructure is provided by us.

# Advantages

This deploy alternative provides several advantages, to name a few:

  • ๐Ÿคน Multiple website instances
  • ๐Ÿ“ฑ Portability
  • ๐ŸŒˆ Easy maintenance
  • ๐Ÿ” Automatic HTTPS setup
  • ๐ŸŽจ Customization
  • ๐Ÿ‘ฎโ€โ™‚๏ธ More secure
  • ๐ŸŒŽ CloudFlare integration

# Repository

Check the repository at chevereto/docker (opens new window) for instructions.

# Requirements

# Pure Docker

Refer to PURE-DOCKER (opens new window) for a complete pure Docker command reference.

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/ \
  -v /var/www/html/images/ \
  ghcr.io/chevereto/chevereto:latest

# Getting a server

For this guide we are referring to a server as a machine where you can install Docker (opens new window). In this server you will install Chevereto and expose it to the internet. You can use any computer, even at your home or from any cloud provider.

For this guide we will use a Ubuntu server in the cloud.

You may purchase a server from our partners (Linode (opens new window), Vultr (opens new window)) including free credits.

# Shell access

The shell is a command-line interface that interprets user commands on the server. To access to the server shell you need a terminal emulator software. Don't feel intimidated, is not that hard as it looks as cloud provider may supply a web-based terminal software.

We recommend accessing your server shell with terminal software installed in your computer.

Here are some free, commonly-used terminal emulators by operating system:

System Software
macOS Terminal, iTerm 2
Windows Windows Terminal, Putty
Linux Gnome Terminal, Tilix, XTerm

Terminal iTerm2

Once you get shell access, make sure that your server has make, unzip, curl and git installed. You will require to install these utilities if missing.

which make unzip curl git

# Cloning chevereto/docker

Get a copy of our base Docker project by cloning the repository in the server using git. This will create a docker folder in the current working directory.

git clone https://github.com/chevereto/docker.git

Go to this newly created docker folder.

cd docker

While on docker folder you can work with our Docker base project.

# Installing Docker

If you are using Ubuntu you can install docker by running:

make install-docker

For other systems follow the instructions for Docker Engine installation (opens new window). Make sure to check at Server for your specific Linux distribution.

Docker Engine installation

Installation overview

# Setup Cron

This process creates a Cron file at /etc/cron.d/chevereto that will run background jobs for all Chevereto instances in the server.

make cron

# Create proxy

This process creates the proxy service that handles incoming web traffic to the server. It will also provide automatic secure certificate for HTTPS.

make proxy EMAIL_HTTPS=mail@yourdomain.tld

At EMAIL_HTTPS option pass your email, required for HTTPS certificate notifications.

# Build Chevereto image

This process builds the container image for the Chevereto application.

๐Ÿ’ก Omit this step when using free edition as the image is available at GHCR (opens new window).

make image

# Setup namespace

Create a namespace (opens new window) for each one of the Chevereto instances you want to deploy.

To create the example namespace for img.chevereto.dev hostname:

make namespace NAMESPACE=example HOSTNAME=img.chevereto.dev

# Spawn Chevereto instance

To create an instance run make spawn command by passing the NAMESPACE option.

๐Ÿ’ก When using free edition pass EDITION=free.

make spawn NAMESPACE=example

๐ŸŽ‰ Congratulations, Chevereto is now up an running.

To create more instances repeat the steps from Setup namespace for each additional website you want to spawn.

# Updates

Refer to UPDATING (opens new window) for instructions on how to update Chevereto when using Docker.