version: '3.8'

services:
  dbMenus:
    image: mysql:8.0
    command: --default-authentication-plugin=mysql_native_password
    volumes:
      - data:/var/lib/mysql
      - ./menusdb.sql:/docker-entrypoint-initdb.d/init.sql
    environment:
      - MYSQL_ROOT_PASSWORD=secret
      - MYSQL_DATABASE=wordpress
      - MYSQL_USER=manager
      - MYSQL_PASSWORD=secret
    ports:
      - 3322:3306
    networks:
      - menus-network

  webMenus:
    image: wordpress:6.5.5
    environment:
      - WORDPRESS_DB_HOST=dbMenus:3306
      - WORDPRESS_DB_NAME=wordpress
      - WORDPRESS_DB_USER=manager
      - WORDPRESS_DB_PASSWORD=secret
    ports:
      - 3020:80
    networks:
      - menus-network
    volumes:
      - ./menu.velasresorts.com:/var/www/html/
      - ./php/wp-config.php:/var/www/html/wp-config.php



volumes:
  data:

networks:
  menus-network:
    driver: bridge
