services:

  ghost:
    image: ghost:5-alpine
    restart: always
    ports:
      - 127.0.0.1:8099:2368
    environment:
      # see https://ghost.org/docs/config/#configuration-options
      database__client: mysql
      database__connection__host: db
      database__connection__user: root
      database__connection__password: thorwebsite33344!
      database__connection__database: ghost
      mail__transport: SMTP
      mail__options__host: mail.your-server.de
      mail__options__port: 587
      mail__options__secure: false
      mail__from: "Atelier Thor <no-reply@freedombox.be>"
      mail__options__auth__user: no-reply@freedombox.be
      mail__options__auth__pass: 4vz325j76pwRcDt4
      url: https://atelierthor.be
      NODE_ENV: production
    volumes:
      - ./ghost:/var/lib/ghost/content
    networks:
      - docker-network

  db:
    image: mysql:8.0
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: thorwebsite33344!
    volumes:
      - ./db:/var/lib/mysql
    networks:
      - docker-network

volumes:
  ghost:
  db:

networks:
  docker-network:
    external: true
