Installation with Podman

How to install Cradle CMS and eCommerce with Podman on a Linux server.

Login with Podman

The podman/docker username is the licence key which you find under Licences on your account page. Password is the customer account password

podman login registry.cradlecms.com
Username: 
Password:  
Login Succeeded!
On windows you might have to use registry.cradlecms.com:5000

Create storage

Its good practise to create a docker / podman volume so that the container/server can persist your data (media and databases) on the host system (your linux server).

podman volume create storage

Download the latest image

CMS

podman pull registry.cradlecms.com/cradle-cms:latest

eCommerce

podman pull registry.cradlecms.com/cradle-ecommerce:latest

Installation

To install and start the service you use the podman `run` command. 

For production

CMS

podman run -it -d --restart unless-stopped -p 443:4040 -p 80:8080 --name cradle-cms -v storage:/storage -e ADMIN_PASS="" -e SECRET_KEY="" -e DOMAIN_NAME="your.site.domain" registry.cradlecms.com/cradle-cms:latest

eCommerce

podman run -it -d --restart unless-stopped -p 443:4040 -p 80:8080 --name cradle-ecommerce -v storage:/storage -e ADMIN_PASS="" -e SECRET_KEY="" -e DOMAIN_NAME="your.site.domain" registry.cradlecms.com/cradle-ecommerce:latest

All environment options (-e) are needed for the first time setup. It lets you configure the first admin user and set the encryption key used for sensitive data, such as your email server password.

Configuration options: site, frontend and admin

You also need to register and setup a domain name at a domain name provider.

The server automatically negotiates a SSL certificate from letsencrypt on demand. You can install your own default certificate in /storage/certs/cert.pem

Local setup (for test driving) without a domain

This setup creates a webserver on https://localhost:4040.

CMS

podman run -v storage:/storage -p 4040:4040 -e ACME=false registry.cradlecms.com/cradle-cms:latest

eCommerce

podman run -v storage:/storage -p 4040:4040 -e ACME=false registry.cradlecms.com/cradle-ecommerce:latest

Admin at /admin username admin, password admin password.

To start cradle-cms without a domain name we use the -e ACME=false option. It disables automatic letsencrypt certificates and defaults using a self-signed certificate. More configuration options.

Logs

The system log is written to standard out in json format so you can use tools such as jq to filter log messages. To see the log output you need to use docker logs as shown in the example.

podman logs -f <container id>

You can also subscribe to a log event stream using the nats client. 

nats subscribe "logs.>"
[#6] Received on "logs.frontend"
{"time":"2024-09-28T08:54:26.176Z","level":"INFO","service":"frontend","msg":"render","host":"localhost:4040","site":"17427f63-e498-4654-bcaa-a6f24afabeef","path":"/","type":"index","handle":"","lang":"en"} 
Use the log stream if you want to store the log on another server or monitor it in real time.

We also support log forwarding to external log servers such as VictoraLogs or QuestDB.

References