version: '3'

services:
  deco:
    image: nmtakiyama/deco-dev:latest
    ports:
      - 3000:3000
    volumes:
      - ./files:/var/deco/files
    env_file:
      - deco.env
      - mysql.env
    environment:
      TZ: 'Asia/Tokyo'
    depends_on:
      - db
      - clamd
      - mta
    restart: unless-stopped
  db:
    image: mysql:5.7
    expose:
      - 3306
    env_file:
      - mysql.env
    environment:
      TZ: 'Asia/Tokyo'
    command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
    restart: unless-stopped
  clamd:
    image: clamav/clamav
    expose:
      - 3310
    restart: unless-stopped
  mta:
    build: ./mta
    expose:
      - 25
    env_file:
      postfix.env
    restart: unless-stopped
