Newer
Older
docker-compose / wordpress / docker-compose-db.yml
Your Name on 5 Jul 533 bytes wp
version: '3.1'

services:

  wordpress:
    image: wordpress:5.2.2-php7.2
    restart: always
    volumes:
      - '/var/www/wordpress:/var/www/html'
    ports:
      - 8080:80
    environment:
      WORDPRESS_DB_HOST: db
      WORDPRESS_DB_USER: exampleuser
      WORDPRESS_DB_PASSWORD: examplepass
      WORDPRESS_DB_NAME: exampledb

  db:
    image: mysql:5.7
    restart: always
    environment:
      MYSQL_DATABASE: exampledb
      MYSQL_USER: exampleuser
      MYSQL_PASSWORD: examplepass
      MYSQL_RANDOM_ROOT_PASSWORD: '1'