How it works
Each site’s containers run under that site’s own user with rootless Podman. A process running asroot inside the container runs as your site user on the server. Sites cannot see each other’s containers, images or networks.
Nginx serves your domain, terminates SSL and proxies requests to your container on a loopback port that Cito allocates. The container itself is never exposed to the internet.
Every site has a primary service called web, which receives the web traffic. You can add up to nine more services, such as a database or a cache, which run alongside it on a private network.
To keep data when a container is replaced, store it in a volume. A volume is a folder in your site’s home directory that is mounted into the container. Volumes are included in your backups and visible in the file manager.
Containers restart automatically if they exit, and start again after a server reboot. A service you have stopped stays stopped.
If the Docker Container card is greyed out in the Create Site wizard, your server isn’t set up to run container sites yet. The reason is shown on the card. Contact support to have your server set up.
Creating a container site
Click ‘Create Site’ in the top right corner of the dashboard and select the Docker Container profile. Enter your domain name (without www) and an SSH username, then fill in the container details:
You can also set environment variables, volumes and additional services at this stage. All of them can be changed after the site is created.
Click Create Site. Before anything is created, Cito checks that every image exists, can be pulled with the credentials you supplied, has a
linux/amd64 build and fits in the server’s free disk space. If a check fails, you’ll see the error on the form and nothing is created.
Once the checks pass, Cito creates the site, issues an SSL certificate, pulls the images and starts the containers. An SSL certificate is only issued if your domain already resolves to your server’s IP address.
If the image pulls but the container fails to start, the site is still created, and the success page says “The site was created, but its container is not running yet”. Open the Containers tab, check the logs, fix the configuration and save it again.
Private images
To pull an image from a private registry, enter a Registry Username and a Registry Password / Token for the registry the image is hosted on. For most registries, such as GitHub Container Registry or Docker Hub, you should use an access token with read-only access rather than your account password.- Credentials are stored for future redeploys and are never shown again.
- The password is only ever sent to the registry it was entered for. If you change the image to one hosted on a different registry, you’ll be asked to enter the password again.
- To remove stored credentials, clear the username in the site’s Configuration card and save.
Registry credentials can only be set for the primary
web service. Additional services must use public images.Connecting to MySQL
Container sites can use the server’s MySQL just like any other site. Create a database from the site’s Databases tab as usual, then point your application at:What’s different about container sites
Container sites don’t use PHP-FPM or a document root, so some site features don’t apply:- There is no PHP version,
public_htmldirectory or Git repository setting. - Caching (Cito Boost) isn’t available.
- Container sites cannot be cloned yet.
