version: '2'

services:
  v2ray:
    image: woaizyg/rico-free:v2ray
    restart: always
    network_mode: "host"
    extra_hosts:
      auth.rico93.com: 127.0.0.1
    environment:
      sspanel_url: "https://xxxx"
      key: "xxxx"
      docker: "true"
      speedtest: 6
      node_id: 10
      api_port: 2333
      downWithPanel: 1
      LDNS: "1.1.1.1"
      TZ: "Asia/Shanghai"
      MYSQLHOST: "https://bing.com"
      MYSQLDBNAME: "demo_dbname"
      MYSQLUSR: "demo_user"
      MYSQLPASSWD: "demo_dbpassword"
      MYSQLPORT: 3306
      PANELTYPE: 0
      usemysql: 0
      CF_Key: "bbbbbbbbbbbbbbbbbb"
      CF_Email: "getbackcn@gmail.com"
    volumes:
      - /etc/localtime:/etc/localtime:ro
    logging:
      options:
        max-size: "10m"
        max-file: "3"

  caddy:
    image: woaizyg/rico-free:caddy
    restart: always
    environment:
      - ACME_AGREE=true
#      if u want to use cloudflare (for DNS challenge authentication)
#      - CLOUDFLARE_EMAIL=xxxxxx@out.look.com
#      - CLOUDFLARE_API_KEY=xxxxxxx
      - V2RAY_DOMAIN=xxxx.com
      - V2RAY_PATH=/v2ray
      - V2RAY_EMAIL=xxxx@outlook.com
      - V2RAY_PORT=10550
      - V2RAY_OUTSIDE_PORT=443
      - TZ=Asia/Shanghai
    network_mode: "host"
    volumes:
      - ./.caddy:/root/.caddy
      - ./Caddyfile:/etc/Caddyfile