version: '3.2'
services:
  gochan:
    build:
      context: ..
      dockerfile: docker/Dockerfile
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ../:/opt/gochan # note: this doesn't work too well in MacOS. 
    environment:
      - DBTYPE=mysql
      - DATABASE_HOST=mysql
      - DATABASE_PORT=3306
      - DATABASE_NAME=gochan
      - DATABASE_USER=gochan
      - DATABASE_PASSWORD=gochan
    depends_on:
      - mysql

  mysql:
    expose:
      - "3306"
    build: ./alpineMysql
    environment:
      - MYSQL_ROOT_PASSWORD=root
      - MYSQL_DATABASE=gochan
      - MYSQL_USER=gochan
      - MYSQL_PASSWORD=gochan
