version: '2'

services:
  # PostgreSQL
  postgres:
    image: sushantdhiman/postgres:10
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
      POSTGRES_DB: sequelize_test
    ports:
      - "54320:5432"
    container_name: postgres
    command: >
      bash -c "sed -i -e 's/# \(zh_TW\|en_US\).UTF-8 UTF-8/\1.UTF-8 UTF-8/' /etc/locale.gen
      && locale-gen
      && docker-entrypoint.sh postgres"

  # MySQL
  mysql:
    image: mysql:5.7
    environment:
      MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
      MYSQL_DATABASE: sequelize_test
      MYSQL_USER: root
    ports:
      - "33060:3306"
    container_name: mysql
