# 用户使用，最终镜像

version: "3.7"

services:

  db:
    image: mysql
    ports:
      - 0.0.0.0:3306:3306
    expose:
      - 3306
    command: --default-authentication-plugin=mysql_native_password
    environment:
      MYSQL_ROOT_PASSWORD: walle
      MYSQL_DATABASE: walle
    volumes:
      - /data/walle/mysql:/var/lib/mysql
    networks:
      - walle-net
    restart: always

  adminer:
    image: adminer
    ports:
      - 8888:8080
    networks:
      - walle-net
    restart: always


  ui:
    image: walle/walle-ui:latest
    expose:
      - 8000
    networks:
      - walle-net
    restart: always

  web:
    image: walle/walle-api:latest
    depends_on:
      - db
    expose:
      - 5000
    environment:
      - WALLE_SECRET="guess me out"
    networks:
      - walle-net
    restart: always

  gateway:
    image: walle/walle-gateway:latest
    ports:
      - 0.0.0.0:80:80
    volumes:
      - ./fe/:/data/web/:ro
    networks:
      walle-net:
    restart: always

networks:
  walle-net: ~
