version: '3.3' services: blog: image: ghost:5-alpine container_name: ghost restart: always depends_on: database: condition: service_healthy healthcheck: test: "nc localhost 2368 || exit 1" interval: 30s timeout: 10s retries: 5 expose: - 2368 ports: - 2368:2368 volumes: - ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/ghost/content:/var/lib/ghost/content environment: # see https://ghost.org/docs/config/#configuration-options database__client: ${DB_CLIENT:-mysql} database__connection__host: ${DB_HOST:-database} database__connection__user: ${DB_USER:-ghost} database__connection__password: ${DB_USER_PASS:-DatabasePassword1234} database__connection__database: ${DB_NAME:-ghost} url: http://127.0.0.1:2368 # adjust to your domain and correct protocol handler + port #NODE_ENV: developmnent # default is production already #mail__transport: SMTP #mail__options__host: ${SMTP_HOST:-smtp.google.com} #mail__options__port: ${SMTP_PORT:-587} #mail__options__auth__user: ${SMTP_USER:-ghost@example.com} #mail__options__auth__pass: ${SMTP_PASS:-SMTPPassword} #mail__from: ${SMTP_MAIL_FROM:-Ghost} #networks: # - proxy #labels: # - traefik.enable=true # - traefik.http.routers.ghost.rule=Host(`blog.example.com`) # - traefik.http.services.ghost.loadbalancer.server.port=2368 # - traefik.docker.network=proxy # # Part for local lan services only # #- traefik.http.routers.ghost.middlewares=external-secure@file database: image: mysql:8 container_name: ghost_db restart: always healthcheck: test: ["CMD", 'mysqladmin', 'ping', '-h', 'localhost', '-u', 'root', '-p$$DB_ROOT_PASS' ] timeout: 20s retries: 10 volumes: - ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/ghost/mysql:/var/lib/mysql expose: - 3306 environment: MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS:-DatabaseRootPassword54321} MYSQL_DATABASE: ${DB_NAME:-ghost} MYSQL_USER: ${DB_USER:-ghost} MYSQL_PASSWORD: ${DB_USER_PASS:-DatabasePassword1234} #networks: # - proxy #networks: # proxy: # external: true