version: '3'

services:
  mysql:
    container_name: mysql-stable
    restart: always
    image: wonderlandpark/mariadb-mroonga:latest
    hostname: mysql
    env_file:
      - .env
    command:
      - --character-set-server=utf8mb4
      - --collation-server=utf8mb4_unicode_ci
    volumes:
      - /home/ubuntu/mysql:/var/lib/mysql
  mongo:
    container_name: mongo-stable
    restart: always
    image: mongo:5.0
    hostname: mongo
    env_file:
      - .env
    volumes:
      - /home/ubuntu/mongo:/data/db
  web:
    container_name: web-stable
    restart: always
    image: wonderlandpark/koreanbots:nightly
    ports:
      - 3000:3000
    links:
      - mysql
    env_file:
      - .env.production.local
    deploy:
      resources:
        limits:
          memory: 500M
