version: '3'
services:
  mariadb:
    image: mariadb:latest
    container_name: d7_eclipsecon_mariadb
    ports:
      - 3306
    volumes:
      - ../_shared/mysql/conf.d:/etc/mysql/conf.d
      - ./volumes/mariadb:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: ${EWT_MYSQL_PASSWORD}
      MYSQL_DATABASE: dev_drupal7_eclipsecon
  www:
    build:
      context: ../php/
      dockerfile: Dockerfile.php5.5
    image: php55
    container_name: d7_eclipsecon_www
    ports:
      - 80
    volumes:
      - ./www/sites/:/var/www/html/sites
      - $SSH_AUTH_SOCK:$SSH_AUTH_SOCK
    environment:
      SSH_AUTH_SOCK: $SSH_AUTH_SOCK
      VIRTUAL_HOST: 'www.eclipsecon.dev.docker'
      CERT_NAME: dev.docker
      MYSQL_PASSWORD: ${EWT_MYSQL_PASSWORD}
      MYSQL_USER: ${EWT_MYSQL_USER}
      LDAP_HOST: ${EWT_LDAP_HOST}
      RECAPTCHA_PUBKEY: ${EWT_RECAPTCHA_PUBKEY}
      RECAPTCHA_PRIVKEY: ${EWT_RECAPTCHA_PRIVKEY}
      RECAPTCHA_MAILHIDE_PUBKEY: ${EWT_RECAPTCHA_MAILHIDE_PUBKEY}
      RECAPTCHA_MAILHIDE_PRIVKEY: ${EWT_RECAPTCHA_MAILHIDE_PRIVKEY}
  nginx-proxy:
    image: jwilder/nginx-proxy
    container_name: d7_eclipsecon_proxy
    ports:
      - 80:80
      - 443:443
    volumes:
      - /var/run/docker.sock:/tmp/docker.sock:ro
      - ../_shared/certs:/etc/nginx/certs
      - ../_shared/nginx/webdev-nginx.conf:/etc/nginx/conf.d/webdev-nginx.conf
