services:
  wp_arch_db:
    image: mariadb:10.6
    container_name: wp_arch_db_cont
    volumes:
      - wp_arch_db_data:/var/lib/mysql
    restart: always
    ports:
      - "3307:3306"
    environment:
      MYSQL_ROOT_PASSWORD: root_password
      MYSQL_DATABASE: wp_architect_db
      MYSQL_USER: wp_user
      MYSQL_PASSWORD: wp_password

  wp_arch_app:
    depends_on:
      - wp_arch_db
    image: wordpress:latest
    container_name: wp_arch_app_cont
    ports:
      - "8888:80"
    restart: always
    volumes:
      - ./:/var/www/html
    environment:
      WORDPRESS_DB_HOST: wp_arch_db:3306
      WORDPRESS_DB_USER: wp_user
      WORDPRESS_DB_PASSWORD: wp_password
      WORDPRESS_DB_NAME: wp_architect_db

volumes:
  wp_arch_db_data: