version: '2'

services:
  mysqldata:
    image: mysql:5.7
    command: /bin/true

  mysql:
    image: mysql:5.7
    restart: always
    env_file:
      - ../mysql.env
    volumes_from:
      - mysqldata

  web:
    image: ghcr.io/huginn/huginn-single-process
    restart: always
    ports:
      - "3000:3000"
    env_file:
      - ../mysql.env
      - ../secrets.env
    depends_on:
      - mysql

  threaded:
    image: ghcr.io/huginn/huginn-single-process
    command: /scripts/init bin/threaded.rb
    restart: always
    env_file:
      - ../mysql.env
      - ../secrets.env
    depends_on:
      - mysql
      - web
