#docker-compose.yml

version: "3.3"
services:

  blog:
   image: dalareo/wordpress-ldap
   logging:
      driver: loki
      options:
        loki-url: "http://localhost:3100/loki/api/v1/push"
   container_name: blog
   restart: unless-stopped
   ports:
    - "8083:80"
   volumes:
    - /home/icke/blog/:/var/www/html
    - /home/icke/blog/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
   links:
    - mysql-blog
   environment:
    WORDPRESS_DB_HOST: mysql-blog
    WORDPRESS_DB_USER: wordpress
    WORDPRESS_DB_NAME: blog
    WORDPRESS_DB_PASSWORD: eccmts42*
   networks:
     blog:
       ipv4_address: 172.23.0.2

  mysql-blog:
    image: mysql:5.7
    container_name: mysql-blog
    environment:
#     - default-authentication-plugin=mysql_native_password
     - MYSQL_ROOT_PASSWORD=eccmts42*
     - MYSQL_DATABASE=blog
     - MYSQL_USER=wordpress
     - MYSQL_PASSWORD=eccmts42*
    volumes:
     - /home/icke/mysql-blog/var:/var/lib/mysql
    restart: unless-stopped
    networks:
      blog:
        ipv4_address: 172.23.0.3

networks:
  blog:
    driver: bridge
    ipam:
     config:
       - subnet: 172.23.0.0/29

volumes:
  blog:
  mysql-blog: