version: "3.7"

services:
  bot:
    image: node:16.9.0-alpine
    command: sh -c "npm install && node ."
    restart: unless-stopped
    environment:
      - TZ=Europe/Berlin
    depends_on:
      - "mysql"
    working_dir: /app
    volumes:
      - ./:/app
      - /usr/share/fonts/:/usr/share/fonts/
  mysql:
      image: mysql:8.0
      ports:
        - 3306:3306
      volumes:
        - ./data/db:/var/lib/mysql
      environment: 
        - TZ=Europe/Berlin
        - MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
        - MYSQL_DATABASE=${DB_DATABASE}
        - MYSQL_USER=${DB_USERNAME}
        - MYSQL_PASSWORD=${DB_PASSWORD}