services:
  myubuntu:
    image: chunlinwang/myubuntu:latest  # 使用你之前 commit 的 myubuntu 镜像
    container_name: myubuntu
    restart: always
    network_mode: host  # 使用 host 网络模式
    dns:
      - 8.8.8.8
    shm_size: '2048m'
    cap_add:
      - SYS_PTRACE
    privileged: true

  subweb:
    image: stilleshan/sub  #因为作者这个不支持vless，虽然容器自带后端但是还是要用其他的后端，在bt反代配置中区分/sub与非/sub
    container_name: subweb
    restart: always
    ports:
      - "18080:80"  # 宿主机端口 18080 映射到容器的 80 端口
    environment:
      SITE_NAME: "MELULU"        # 设置环境变量
      API_URL: "https://sub.melulu.top"
      SHORT_URL: "https://st.melulu.top"

  myurls:
    image: stilleshan/myurls:latest
    container_name: myurls
    environment:
      - MYURLS_DOMAIN=st.melulu.top
      - MYURLS_PROTO=https
    volumes:
      - ./data/myurls/logs:/app/logs
    ports:
      - "8081:8080"
    depends_on:
      - redis
    restart: always

  redis:
    image: redis:latest
    container_name: myurls-redis
    volumes:
      - ./data/redis:/data
    restart: always
