version: '3' services: ghost: image: ghost:latest restart: always depends_on: - db environment: url: https:// database__client: mysql database__connection__host: db database__connection__user: root database__connection__password: MyStrongPassword database__connection__database: ghost volumes: - ./content:/var/lib/ghost/content - ./config.production.json:/var/lib/ghost/config.production.json db: image: mysql:8.0 ports: - 3306:3306 restart: always environment: MYSQL_ROOT_PASSWORD: MyStrongPassword volumes: - ./mysql:/var/lib/mysql nginx: image: nginx:latest restart: always depends_on: - ghost ports: - "80:80" - "443:443" volumes: - /etc/letsencrypt/:/etc/letsencrypt/ - /usr/share/nginx/html:/usr/share/nginx/html - ./nginx/default.conf:/etc/nginx/conf.d/default.conf