I’ve seen this Github project:
and
GitHub - egeldenhuys/ghost-cloudflare-r2: Cloudflare R2 storage adapter for Ghost (this one seems to have some better documentation, but I do not see a portainer stack/docker compose part)
I have an existing stack/docker compose in portainer that looks like this:
version: '3.1'
services:
ghost:
image: ghost:alpine
restart: always
ports:
- hidden:hidden
environment:
# see https://ghost.org/docs/config/#configuration-options
enableDeveloperExperiments: 'true'
GHOST_ENABLE_NEST_FRAMEWORK: 1
database__client: hidden
database__connection__host: hidden
database__connection__user: hidden
database__connection__password: hidden
database__connection__database: hidden
mail__transport: SMTP
mail__options__host: hidden
mail__options__port: hidden
mail__options__auth__user: hidden
mail__options__auth__pass: hidden
mail__from: hidden. <hidden@hidden>
# this url value is just an example, and is likely wrong for your environment!
url: hidden
# contrary to the default mentioned in the linked documentation, this image defaults to NODE_ENV=production (so development mode needs to be explicitly specified if desired)
#NODE_ENV: hidden
db:
image: mysql:8.0
restart: always
environment:
MYSQL_ROOT_PASSWORD: hidden
I do see the following shown on the github page(from the first one), would this work?
"storage": {
"active": "ghost-cloudflare-r2-storage",
"ghost-cloudflare-r2-storage": {
"bucket": "<YOUR_BUCKET_NAME>",
"endpoint": "<YOUR_ACCOUNT_ID>.r2.cloudflarestorage.com",
"accessKeyId": "<YOUR_ACCESS_KEY_ID>",
"secretAccessKey": "<YOUR_SECRET_ACCESS_KEY>",
"publicDomain": "https://subdomaintohostfiles.yourdomain.com"
}
}
If now, how can I make a Cloudflare R2 storage adapter to my compose/stack, so when I rebuild the stack fully it will persist(which the normal docker method would not work).
Any and all help is appreciated!