version: ‘3’services:
  db:
    image: mariadb:10.5
    volumes:
      - db_data:/var/lib/mysql
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: <your-root-password>
      MYSQL_DATABASE: <your-database-name>
      MYSQL_USER: <your-user-name>
      MYSQL_PASSWORD: <your-user-password>
  
  wordpress:
    depends_on: db
    image: wordpress:latest
    ports:
      - “8000:80”
    restart: always
    volumes:
      - ./wordpress:/var/www/html/
    environment:
      WORDPRESS_DB_HOST: db:3306
      WORDPRESS_DB_USER: <your-db-user>
      WORDPRESS_DB_PASSWORD: <your-db-password>
      WORDPRESS_DB_NAME: <your-database-name>volumes:
  db_data:
