Skip to content

Instantly share code, notes, and snippets.

@JacobLinCool
Last active June 24, 2024 12:13
Show Gist options
  • Save JacobLinCool/eb1032b287b83ba8d32db40a0046474a to your computer and use it in GitHub Desktop.
Save JacobLinCool/eb1032b287b83ba8d32db40a0046474a to your computer and use it in GitHub Desktop.
Bahamut Automation Docker (🐳)

Bahamut Automation Docker (🐳)

  1. 下載 config.yml 並修改設定
  2. 執行以下命令
docker run --rm -v "$(pwd)/config.yml:/config.yml" jacoblincool/bahamut-automation
# --rm: 容器執行完就自動刪除
# -v: 將主機目前目錄下的 `config.yml` 掛載至容器的 `/config.yml`
#     你可以改成任何主機上指向設定檔的位置,但要掛在 `/config.yml` 上
如何使用?
1. 安裝 Docker Desktop: https://www.docker.com/products/docker-desktop/
2. 看 README.md
---
# 所有模組皆可存取的共用參數
shared:
shared_key: shared_val
# 使用的模組及其參數,可以是內建的模組或是自製模組的路徑
modules:
# 註冊一些通用函式到 shared
utils:
report:
ad_handler:
# 主要功能模組
login:
username: string # 使用者名稱
password: string # 密碼
sign:
guild:
answer:
lottery:
max_attempts: 20
logout:
# 以下是寄報告的部分
telegram:
channel: telegram_channel_id
discord:
webhook: discord_webhook_url
line_notify:
token: line_token
issue:
# 自製模組(範例)
/path/to/module:
param1: value1
param2: value2
# 瀏覽器的設定
browser:
type: firefox
headless: true
firefoxUserPrefs:
dom.webaudio.enabled: false
media.volume_scale: 0
media.default_volume: 0
# 如果要使用非內建的瀏覽器執行,請設定 executablePath
# executablePath: /path/to/browser
# 更多設定請查閱:https://playwright.dev/docs/api/class-browsertype#browser-type-launch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment