achief

Ghost CMS Docker-Compose file

Apr 28th, 2023
2,659
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.21 KB | Software | 0 0
  1. version: '3.1'
  2.  
  3. services:
  4.  
  5.   ghost:
  6.     image: ghost:latest
  7.     restart: always
  8.     ports:
  9.       - 8080:2368
  10.     environment:
  11.       # see https://ghost.org/docs/config/#configuration-options
  12.       database__client: mysql
  13.       database__connection__host: db
  14.       database__connection__user: root
  15.       database__connection__password: <password-hidden>
  16.       database__connection__database: ghost
  17.       url: http://domain.com
  18.       # 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)
  19.       #NODE_ENV: development
  20.  
  21.     volumes:
  22.       - ./content:/var/lib/ghost/content
  23.  
  24.     labels:
  25.       - traefik.enable=true
  26.       - traefik.docker.network=proxy
  27.       - traefik.http.routers.ghost.entrypoints=websecure
  28.       - traefik.http.routers.ghost.rule=Host(`domain.com`)
  29.  
  30.     networks:
  31.       - proxy
  32.       - redaltghost
  33.  
  34.   db:
  35.     image: mysql:8.0
  36.     restart: always
  37.     environment:
  38.       MYSQL_ROOT_PASSWORD: <password-hidden>
  39.  
  40.     volumes:
  41.       - ./mysql:/var/lib/mysql
  42.  
  43.     networks:
  44.       - redaltghost
  45.  
  46. networks:
  47.   proxy:
  48.     external: true
  49.   redaltghost:
  50.     external: true
Advertisement
Add Comment
Please, Sign In to add comment