Deploy Ghost on Pethost in one click
A publishing platform for blogs and newsletters
What happens
- You sign in to Pethost or make an account, with a passkey, GitHub or Google.
- No machine yet? You pick a plan, and we prepare one for you. The link waits in your browser until it is ready.
- New project opens at the app, and you click Create project.
- In a minute or two the app is live at its own address with HTTPS. Its secrets are made for it at random, and its data is in the nightly backup.
- It is a project like any other: its compose.yaml, its .env, its logs and a terminal are in the panel, and your agent can change it, roll it back or restore it.
First steps
Create the owner account at /ghost; the first start takes about a minute. Do it right away: until then the page is open to whoever has the address. Email works after you add Ghost’s mail__ variables to the project’s .env and deploy again.
What it runs
The template is this compose.yaml and the variables it writes into the project’s .env. Pethost runs the file as it is written.
services:
ghost:
image: ghost:6-alpine
restart: unless-stopped
depends_on:
db:
condition: service_healthy
# Mail settings (mail__transport, mail__options__host, ...) go into .env.
env_file: .env
environment:
url: ${URL}
server__host: 0.0.0.0
database__client: mysql
database__connection__host: db
database__connection__user: ghost
database__connection__password: ${DB_PASSWORD}
database__connection__database: ghost
# Ghost emails a code to every new device that signs in. Without mail
# that locks the owner out, so it is off. Remove this line once mail works.
security__staffDeviceVerification: "false"
volumes:
- content:/var/lib/ghost/content
db:
image: mysql:8.4
restart: unless-stopped
environment:
MYSQL_DATABASE: ghost
MYSQL_USER: ghost
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
volumes:
- db:/var/lib/mysql
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h 127.0.0.1 -uroot -p$$MYSQL_ROOT_PASSWORD --silent"]
interval: 5s
timeout: 5s
retries: 12
start_period: 60s
volumes:
content:
db: