media-server-docker-compose/sites/techblog/docker-compose.yml
2024-09-14 14:43:30 -04:00

40 lines
1.2 KiB
YAML

services:
ghost:
image: ghost:5
restart: always
ports:
- 2373:2368
expose:
- 2373
environment:
# see https://ghost.org/docs/config/#configuration-options
database__client: mysql
database__connection__host: techblog-db-1
database__connection__user: root
database__connection__password: ${DBPASS}
database__connection__database: ghost
VIRTUAL_HOST: "blog.${DOMAIN}"
VIRTUAL_PORT: 2373
LETSENCRYPT_HOST: "blog.${DOMAIN}"
LETSENCRYPT_EMAIL: ${EMAIL}
# url: http://0.0.0.0:2373 #Dev
url: "https://blog.${DOMAIN}" #Prod
# 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: development
volumes:
- ./content:/var/lib/ghost/content
# - ./themes:/var/lib/ghost/current/content/themes:rw
db:
image: mysql:8.0
restart: always
environment:
MYSQL_DATABASE: ghost
MYSQL_ROOT_PASSWORD: ${DBPASS}
volumes:
- db:/var/lib/mysql
volumes:
db:
networks:
default:
name: nginx-proxy
external: true