services:

  wordpress:
    image: wordpress
    restart: always
    ports:
      - 8081:80
    environment:
      WORDPRESS_HOME: "http://localhost:8081"     # Your local wordpress url
      WORDPRESS_SITEURL: "http://localhost:8081"  # Your local wordpress url
      WORDPRESS_DB_HOST: db                       # Your local ip address
      PROD_DOMAIN: "oont.co"                      # Live Domain
      DEV_DOMAIN: "localhost:8081"                # Local wordpress domain

      # Local DB as specified Below
      WORDPRESS_DB_USER: exampleuser
      WORDPRESS_DB_PASSWORD: examplepass
      WORDPRESS_DB_NAME: oont-dev

      # Live remote DB
      PROD_DB_HOST: "sql688.your-server.de"
      PROD_DB_USER: "wp_oonty_1" 
      PROD_DB_PASS: "m3B1iEjUcZ318j5W"
      PROD_DB_NAME: "wp_oonty_db1"
    volumes:
      - ./wordpress:/var/www/html
      - ./tmp/prod-dump.sql:/tmp/prod-dump.sql
      - ./sync-prod-to-dev.sh:/usr/local/bin/sync
      - ./wp-cli.phar:/usr/local/bin/wp
      - ./oont/:/var/www/oont

  db:
    image: mysql:8.0
    restart: always
    ports:
      - 3306:3306
    environment:
      MYSQL_DATABASE: oont-dev
      MYSQL_USER: exampleuser
      MYSQL_PASSWORD: examplepass
      MYSQL_RANDOM_ROOT_PASSWORD: '1'
    volumes:
      - ./db:/var/lib/mysql
