services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: max-bot-test-app
    restart: unless-stopped
    env_file:
      - .env
    environment:
      - TZ=Europe/Moscow
    volumes:
      - ./storage:/var/www/html/storage
    networks:
      - max-bot-test
      - npm_default

  nginx:
    image: nginx:alpine
    container_name: max-bot-test-nginx
    restart: unless-stopped
    ports:
      - "8098:80"
    volumes:
      - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
    depends_on:
      - app
    networks:
      - max-bot-test
      - npm_default

networks:
  max-bot-test:
    driver: bridge
  npm_default:
    external: true
