    # version: '3.8'

services:
  wordpress:
    image: wordpress:latest
    container_name: wp_194
    restart: always
    ports:
      - "8082:80"
    environment:
      WORDPRESS_DB_HOST: db
      WORDPRESS_DB_USER: wpuser
      WORDPRESS_DB_PASSWORD: wppassword
      WORDPRESS_DB_NAME: wpdatabase
    volumes:
      - ./html:/var/www/html
    networks:
      - wp_network

  db:
    image: mysql:5.7
    container_name: db_194
    restart: always
    environment:
      MYSQL_DATABASE: wpdatabase
      MYSQL_USER: wpuser
      MYSQL_PASSWORD: wppassword
      MYSQL_ROOT_PASSWORD: rootpassword
    volumes:
      - ./db:/var/lib/mysql
    networks:
      - wp_network

networks:
  wp_network: