mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-21 05:35:35 +08:00
docker deployment template
This commit is contained in:
133
config/deploy.template-docker-cn.yaml
Normal file
133
config/deploy.template-docker-cn.yaml
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
Deploy:
|
||||||
|
Git:
|
||||||
|
# URL of AzurLaneAutoScript repository
|
||||||
|
# [CN user] Use 'https://gitee.com/LmeSzinc/AzurLaneAutoScript' for faster and more stable download
|
||||||
|
# [Other] Use 'https://github.com/LmeSzinc/AzurLaneAutoScript'
|
||||||
|
Repository: https://gitee.com/LmeSzinc/AzurLaneAutoScript
|
||||||
|
# Branch of Alas
|
||||||
|
# [Developer] Use 'dev', 'app', etc, to try new features
|
||||||
|
# [Other] Use 'master', the stable branch
|
||||||
|
Branch: master
|
||||||
|
# Filepath of git executable `git.exe`
|
||||||
|
# [Easy installer] Use './toolkit/Git/mingw64/bin/git.exe'
|
||||||
|
# [Other] Use you own git
|
||||||
|
GitExecutable: /usr/bin/git
|
||||||
|
# Set git proxy
|
||||||
|
# [CN user] Use your local http proxy (http://127.0.0.1:{port}) or socks5 proxy (socks5://127.0.0.1:{port})
|
||||||
|
# [Other] Use null
|
||||||
|
GitProxy: null
|
||||||
|
# Update Alas at startup
|
||||||
|
# [In most cases] Use true
|
||||||
|
AutoUpdate: true
|
||||||
|
# Whether to keep local changes during update
|
||||||
|
# User settings, logs and screenshots will be kept, no mather this is true or false
|
||||||
|
# [Developer] Use true, if you modified the code
|
||||||
|
# [Other] Use false
|
||||||
|
KeepLocalChanges: false
|
||||||
|
|
||||||
|
Python:
|
||||||
|
# Filepath of python executable `python.exe`
|
||||||
|
# [Easy installer] Use './toolkit/python.exe'
|
||||||
|
# [Other] Use you own python, and its version should be 3.7.6 64bit
|
||||||
|
PythonExecutable: /app/pyroot/bin/python
|
||||||
|
# URL of pypi mirror
|
||||||
|
# [CN user] Use 'https://pypi.tuna.tsinghua.edu.cn/simple' for faster and more stable download
|
||||||
|
# [Other] Use null
|
||||||
|
PypiMirror: https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
|
# Install dependencies at startup
|
||||||
|
# [In most cases] Use true
|
||||||
|
InstallDependencies: true
|
||||||
|
# Path to requirements.txt
|
||||||
|
# [In most cases] Use 'requirements.txt'
|
||||||
|
# [In AidLux] Use './deploy/AidLux/{version}/requirements.txt', version is default to 0.92
|
||||||
|
RequirementsFile: ./deploy/docker/requirements.txt
|
||||||
|
|
||||||
|
Adb:
|
||||||
|
# Filepath of ADB executable `adb.exe`
|
||||||
|
# [Easy installer] Use './toolkit/Lib/site-packages/adbutils/binaries/adb.exe'
|
||||||
|
# [Other] Use you own latest ADB, but not the ADB in your emulator
|
||||||
|
AdbExecutable: /usr/bin/adb
|
||||||
|
# Whether to replace ADB
|
||||||
|
# Chinese emulators (NoxPlayer, LDPlayer, MemuPlayer, MuMuPlayer) use their own ADB, instead of the latest.
|
||||||
|
# Different ADB servers will terminate each other at startup, resulting in disconnection.
|
||||||
|
# For compatibility, we have to replace them all.
|
||||||
|
# This will do:
|
||||||
|
# 1. Terminate current ADB server
|
||||||
|
# 2. Rename ADB from all emulators to *.bak and replace them by the AdbExecutable set above
|
||||||
|
# 3. Brute-force connect to all available emulator instances
|
||||||
|
# [In most cases] Use true
|
||||||
|
# [In few cases] Use false, if you have other programs using ADB.
|
||||||
|
ReplaceAdb: true
|
||||||
|
# Brute-force connect to all available emulator instances
|
||||||
|
# [In most cases] Use true
|
||||||
|
AutoConnect: true
|
||||||
|
# Re-install uiautomator2
|
||||||
|
# [In most cases] Use true
|
||||||
|
InstallUiautomator2: true
|
||||||
|
|
||||||
|
Ocr:
|
||||||
|
# Run Ocr as a service, can reduce memory usage by not import mxnet everytime you start an alas instance
|
||||||
|
|
||||||
|
# Whether to use ocr server
|
||||||
|
# [Default] false
|
||||||
|
UseOcrServer: false
|
||||||
|
# Whether to start ocr server when start GUI
|
||||||
|
# [Default] false
|
||||||
|
StartOcrServer: false
|
||||||
|
# Port of ocr server runs by GUI
|
||||||
|
# [Default] 22268
|
||||||
|
OcrServerPort: 22268
|
||||||
|
# Address of ocr server for alas instance to connect
|
||||||
|
# [Default] 127.0.0.1:22268
|
||||||
|
OcrClientAddress: 127.0.0.1:22268
|
||||||
|
|
||||||
|
Update:
|
||||||
|
# Use auto update and builtin updater feature
|
||||||
|
# This may cause problem https://github.com/LmeSzinc/AzurLaneAutoScript/issues/876
|
||||||
|
EnableReload: true
|
||||||
|
# Check update every X minute
|
||||||
|
# [Disable] 0
|
||||||
|
# [Default] 5
|
||||||
|
CheckUpdateInterval: 5
|
||||||
|
# Scheduled restart time
|
||||||
|
# If there are updates, Alas will automatically restart and update at this time every day
|
||||||
|
# and run all alas instances that running before restarted
|
||||||
|
# [Disable] null
|
||||||
|
# [Default] 03:50
|
||||||
|
AutoRestartTime: 03:50
|
||||||
|
|
||||||
|
Misc:
|
||||||
|
# Enable discord rich presence
|
||||||
|
DiscordRichPresence: false
|
||||||
|
|
||||||
|
Webui:
|
||||||
|
# --host. Host to listen
|
||||||
|
# [Use IPv6] '::'
|
||||||
|
# [In most cases] Default to '0.0.0.0'
|
||||||
|
WebuiHost: 0.0.0.0
|
||||||
|
# --port. Port to listen
|
||||||
|
# You will be able to access webui via `http://{host}:{port}`
|
||||||
|
# [In most cases] Default to 22267
|
||||||
|
WebuiPort: 22267
|
||||||
|
# Language to use on web ui
|
||||||
|
# 'zh-CN' for Chinese simplified
|
||||||
|
# 'en-US' for English
|
||||||
|
# 'ja-JP' for Japanese
|
||||||
|
# 'zh-TW' for Chinese traditional
|
||||||
|
Language: en-US
|
||||||
|
# Theme of web ui
|
||||||
|
# 'default' for light theme
|
||||||
|
# 'dark' for dark theme
|
||||||
|
Theme: default
|
||||||
|
# Follow system DPI scaling
|
||||||
|
# [In most cases] true
|
||||||
|
# [In few cases] false to make Alas smaller, if you have a low resolution but high DPI scaling.
|
||||||
|
DpiScaling: true
|
||||||
|
# --key. Password of web ui
|
||||||
|
# Useful when expose Alas to the public network
|
||||||
|
Password: null
|
||||||
|
# --cdn. Use jsdelivr cdn for pywebio static files (css, js).
|
||||||
|
# 'true' for jsdelivr cdn
|
||||||
|
# 'false' for self host cdn (automatically)
|
||||||
|
# 'https://path.to.your/cdn' to use custom cdn
|
||||||
|
CDN: false
|
||||||
133
config/deploy.template-docker.yaml
Normal file
133
config/deploy.template-docker.yaml
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
Deploy:
|
||||||
|
Git:
|
||||||
|
# URL of AzurLaneAutoScript repository
|
||||||
|
# [CN user] Use 'https://gitee.com/LmeSzinc/AzurLaneAutoScript' for faster and more stable download
|
||||||
|
# [Other] Use 'https://github.com/LmeSzinc/AzurLaneAutoScript'
|
||||||
|
Repository: https://github.com/LmeSzinc/AzurLaneAutoScript
|
||||||
|
# Branch of Alas
|
||||||
|
# [Developer] Use 'dev', 'app', etc, to try new features
|
||||||
|
# [Other] Use 'master', the stable branch
|
||||||
|
Branch: master
|
||||||
|
# Filepath of git executable `git.exe`
|
||||||
|
# [Easy installer] Use './toolkit/Git/mingw64/bin/git.exe'
|
||||||
|
# [Other] Use you own git
|
||||||
|
GitExecutable: /usr/bin/git
|
||||||
|
# Set git proxy
|
||||||
|
# [CN user] Use your local http proxy (http://127.0.0.1:{port}) or socks5 proxy (socks5://127.0.0.1:{port})
|
||||||
|
# [Other] Use null
|
||||||
|
GitProxy: null
|
||||||
|
# Update Alas at startup
|
||||||
|
# [In most cases] Use true
|
||||||
|
AutoUpdate: true
|
||||||
|
# Whether to keep local changes during update
|
||||||
|
# User settings, logs and screenshots will be kept, no mather this is true or false
|
||||||
|
# [Developer] Use true, if you modified the code
|
||||||
|
# [Other] Use false
|
||||||
|
KeepLocalChanges: false
|
||||||
|
|
||||||
|
Python:
|
||||||
|
# Filepath of python executable `python.exe`
|
||||||
|
# [Easy installer] Use './toolkit/python.exe'
|
||||||
|
# [Other] Use you own python, and its version should be 3.7.6 64bit
|
||||||
|
PythonExecutable: /app/pyroot/bin/python
|
||||||
|
# URL of pypi mirror
|
||||||
|
# [CN user] Use 'https://pypi.tuna.tsinghua.edu.cn/simple' for faster and more stable download
|
||||||
|
# [Other] Use null
|
||||||
|
PypiMirror: null
|
||||||
|
# Install dependencies at startup
|
||||||
|
# [In most cases] Use true
|
||||||
|
InstallDependencies: true
|
||||||
|
# Path to requirements.txt
|
||||||
|
# [In most cases] Use 'requirements.txt'
|
||||||
|
# [In AidLux] Use './deploy/AidLux/{version}/requirements.txt', version is default to 0.92
|
||||||
|
RequirementsFile: ./deploy/docker/requirements.txt
|
||||||
|
|
||||||
|
Adb:
|
||||||
|
# Filepath of ADB executable `adb.exe`
|
||||||
|
# [Easy installer] Use './toolkit/Lib/site-packages/adbutils/binaries/adb.exe'
|
||||||
|
# [Other] Use you own latest ADB, but not the ADB in your emulator
|
||||||
|
AdbExecutable: /usr/bin/adb
|
||||||
|
# Whether to replace ADB
|
||||||
|
# Chinese emulators (NoxPlayer, LDPlayer, MemuPlayer, MuMuPlayer) use their own ADB, instead of the latest.
|
||||||
|
# Different ADB servers will terminate each other at startup, resulting in disconnection.
|
||||||
|
# For compatibility, we have to replace them all.
|
||||||
|
# This will do:
|
||||||
|
# 1. Terminate current ADB server
|
||||||
|
# 2. Rename ADB from all emulators to *.bak and replace them by the AdbExecutable set above
|
||||||
|
# 3. Brute-force connect to all available emulator instances
|
||||||
|
# [In most cases] Use true
|
||||||
|
# [In few cases] Use false, if you have other programs using ADB.
|
||||||
|
ReplaceAdb: true
|
||||||
|
# Brute-force connect to all available emulator instances
|
||||||
|
# [In most cases] Use true
|
||||||
|
AutoConnect: true
|
||||||
|
# Re-install uiautomator2
|
||||||
|
# [In most cases] Use true
|
||||||
|
InstallUiautomator2: true
|
||||||
|
|
||||||
|
Ocr:
|
||||||
|
# Run Ocr as a service, can reduce memory usage by not import mxnet everytime you start an alas instance
|
||||||
|
|
||||||
|
# Whether to use ocr server
|
||||||
|
# [Default] false
|
||||||
|
UseOcrServer: false
|
||||||
|
# Whether to start ocr server when start GUI
|
||||||
|
# [Default] false
|
||||||
|
StartOcrServer: false
|
||||||
|
# Port of ocr server runs by GUI
|
||||||
|
# [Default] 22268
|
||||||
|
OcrServerPort: 22268
|
||||||
|
# Address of ocr server for alas instance to connect
|
||||||
|
# [Default] 127.0.0.1:22268
|
||||||
|
OcrClientAddress: 127.0.0.1:22268
|
||||||
|
|
||||||
|
Update:
|
||||||
|
# Use auto update and builtin updater feature
|
||||||
|
# This may cause problem https://github.com/LmeSzinc/AzurLaneAutoScript/issues/876
|
||||||
|
EnableReload: true
|
||||||
|
# Check update every X minute
|
||||||
|
# [Disable] 0
|
||||||
|
# [Default] 5
|
||||||
|
CheckUpdateInterval: 5
|
||||||
|
# Scheduled restart time
|
||||||
|
# If there are updates, Alas will automatically restart and update at this time every day
|
||||||
|
# and run all alas instances that running before restarted
|
||||||
|
# [Disable] null
|
||||||
|
# [Default] 03:50
|
||||||
|
AutoRestartTime: 03:50
|
||||||
|
|
||||||
|
Misc:
|
||||||
|
# Enable discord rich presence
|
||||||
|
DiscordRichPresence: false
|
||||||
|
|
||||||
|
Webui:
|
||||||
|
# --host. Host to listen
|
||||||
|
# [Use IPv6] '::'
|
||||||
|
# [In most cases] Default to '0.0.0.0'
|
||||||
|
WebuiHost: 0.0.0.0
|
||||||
|
# --port. Port to listen
|
||||||
|
# You will be able to access webui via `http://{host}:{port}`
|
||||||
|
# [In most cases] Default to 22267
|
||||||
|
WebuiPort: 22267
|
||||||
|
# Language to use on web ui
|
||||||
|
# 'zh-CN' for Chinese simplified
|
||||||
|
# 'en-US' for English
|
||||||
|
# 'ja-JP' for Japanese
|
||||||
|
# 'zh-TW' for Chinese traditional
|
||||||
|
Language: en-US
|
||||||
|
# Theme of web ui
|
||||||
|
# 'default' for light theme
|
||||||
|
# 'dark' for dark theme
|
||||||
|
Theme: default
|
||||||
|
# Follow system DPI scaling
|
||||||
|
# [In most cases] true
|
||||||
|
# [In few cases] false to make Alas smaller, if you have a low resolution but high DPI scaling.
|
||||||
|
DpiScaling: true
|
||||||
|
# --key. Password of web ui
|
||||||
|
# Useful when expose Alas to the public network
|
||||||
|
Password: null
|
||||||
|
# --cdn. Use jsdelivr cdn for pywebio static files (css, js).
|
||||||
|
# 'true' for jsdelivr cdn
|
||||||
|
# 'false' for self host cdn (automatically)
|
||||||
|
# 'https://path.to.your/cdn' to use custom cdn
|
||||||
|
CDN: false
|
||||||
@@ -387,6 +387,13 @@ class ConfigGenerator:
|
|||||||
'AdbExecutable': '/usr/bin/adb',
|
'AdbExecutable': '/usr/bin/adb',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
docker = {
|
||||||
|
'GitExecutable': '/usr/bin/git',
|
||||||
|
'PythonExecutable': '/app/pyroot/bin/python',
|
||||||
|
'RequirementsFile': './deploy/docker/requirements.txt',
|
||||||
|
'AdbExecutable': '/usr/bin/adb',
|
||||||
|
}
|
||||||
|
|
||||||
def update(suffix, *args):
|
def update(suffix, *args):
|
||||||
file = f'./config/deploy.{suffix}.yaml'
|
file = f'./config/deploy.{suffix}.yaml'
|
||||||
new = deepcopy(template)
|
new = deepcopy(template)
|
||||||
@@ -398,6 +405,8 @@ class ConfigGenerator:
|
|||||||
update('template-cn', cn)
|
update('template-cn', cn)
|
||||||
update('template-AidLux', aidlux)
|
update('template-AidLux', aidlux)
|
||||||
update('template-AidLux-cn', aidlux, cn)
|
update('template-AidLux-cn', aidlux, cn)
|
||||||
|
update('template-docker', docker)
|
||||||
|
update('template-docker-cn', docker, cn)
|
||||||
|
|
||||||
def insert_package(self):
|
def insert_package(self):
|
||||||
option = deep_get(self.argument, keys='Emulator.PackageName.option')
|
option = deep_get(self.argument, keys='Emulator.PackageName.option')
|
||||||
|
|||||||
Reference in New Issue
Block a user