version: '3.1' services: wordpress: image: wordpress container_name: wordpress restart: unless-stopped labels: - "traefik.enable=true" - "traefik.http.routers.wordpress.entrypoints=websecure" - "traefik.http.routers.wordpress.rule=Host(`party.meftimes.com`)" environment: WORDPRESS_DB_HOST: db:3306 WORDPRESS_DB_USER: meftimes WORDPRESS_DB_PASSWORD: password_goes_here WORDPRESS_DB_NAME: exampledb volumes: - wordpress:/var/www/html networks: - proxy - backend db: image: mysql:5.7 restart: always container_name: wordpress-db environment: MYSQL_DATABASE: exampledb MYSQL_USER: meftimes MYSQL_PASSWORD: password_goes_here MYSQL_RANDOM_ROOT_PASSWORD: '1' volumes: - wordpress-db:/var/lib/mysql networks: - backend volumes: wordpress: wordpress-db: networks: proxy: external: true backend: external: true