many new containers. work in progress

This commit is contained in:
Jeff Clement 2024-11-02 14:09:56 -06:00
parent f0f9f608cc
commit aed48ffdf8
Signed by: jeff
GPG key ID: 3BCB43A3F0E1D7DA
31 changed files with 1042 additions and 1 deletions

13
ghost_cloudflare/.env Normal file
View file

@ -0,0 +1,13 @@
# Token used to authentication with CloudFlare Tunnel
TUNNEL_TOKEN= ##REQUIRED##
# Password used for MySQL root account
MYSQL_PASSWORD= ##REQUIRED##
# Base URL for the Blog
URL=https://www.yourname.com
# From credentials use for transactional emails through Mailgun
# Note: that bulk emails need a separate configuration with Mailgun API Key
MAILGUN_USERNAME=ghost@mg.yourname.com
MAILGUN_PASSWORD= ##REQUIRED##

View file

@ -0,0 +1,15 @@
# Ghost Blog behind Cloudflare
This example is covered in a fair bit of detail in this blog post:
https://www.straybits.ca/2024/ghost-cloudflare-setup/
Requires:
* Cloudflare Tunnel
* Mailgun for SMTP and bulk (Newsletter) delivery
Steps:
1. Setup your Tunnel (pointing to `http://ghost`)
2. Update parameters in `.env`
3. `docker compose up -d`
4. Head to Starbucks and get your blog on!

View file

@ -0,0 +1,47 @@
services:
tunnel:
image: cloudflare/cloudflared
command: tunnel --no-autoupdate run
restart: always
environment:
TUNNEL_TOKEN: ${TUNNEL_TOKEN}
depends_on:
- ghost
- caddy
caddy:
image: caddy:alpine
volumes:
- ./static:/usr/share/caddy/static
restart: always
ghost:
image: ghost:5-alpine
restart: always
depends_on:
- db
environment:
# see https://ghost.org/docs/config/#configuration-options
database__client: mysql
database__connection__host: db
database__connection__user: root
database__connection__password: ${MYSQL_PASSWORD}
database__connection__database: ghost
mail__transport: SMTP
mail__options__service: Mailgun
mail__from: ${MAILGUN_USERNAME}
mail__options__auth__user: ${MAILGUN_USERNAME}
mail__options__auth__pass: ${MAILGUN_PASSWORD}
url: ${URL}
server__port: 80
volumes:
- ./data/ghost:/var/lib/ghost/content
db:
image: mysql:8.0
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD}
volumes:
- ./data/db:/var/lib/mysql