services:
  inspector-server:
    image: inspector-server-dev-image
    build:
      context: ..
      dockerfile: ./docker/Dockerfile.dev
    volumes:
      - ../frontend:/var/www/frontend
      - ../backend:/var/www/backend
      - ../cdn:/var/www/cdn
    restart: always
    environment:
      DB_HOST: db
      DB_NAME: insteam
      DB_USER: insteamuser
      DB_PASS: devpass887
      DB_CHARSET: utf8
      CDN_URL: '//localhost:8001/cdn'
      TZ: Europe/Helsinki
    ports:
      - "${HTTP_PORT:-0}:80"
    depends_on:
      - db
  db:
    image: mysql:8-debian
    platform: linux/x86_64
    restart: always
    volumes:
      - source: ../database
        target: /var/lib/mysql
        type: bind
        bind:
          create_host_path: true
    environment:
      MYSQL_ROOT_PASSWORD: rootpass817
      MYSQL_DATABASE: insteam
      MYSQL_USER: insteamuser
      MYSQL_PASSWORD: devpass887
      TZ: Europe/Helsinki
    expose:
      - "3306"
    ports:
      - "3306:3306"

