mirror of
https://github.com/one-among-us/data.git
synced 2024-11-22 19:24:51 +08:00
[U] dockerize
This commit is contained in:
parent
8f826c393e
commit
989f307e52
12
Dockerfile
Normal file
12
Dockerfile
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
FROM python:3.11-alpine
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY requirements.txt /app
|
||||||
|
|
||||||
|
# Since alpine doesn't have stable opencc yet, we need to add its testing repo.
|
||||||
|
# The opencc binary in the testing repo didn't include a libopencc.so.1 file but did include libopencc.so.1.1,
|
||||||
|
# So linking is necessary
|
||||||
|
RUN pip install -r requirements.txt \
|
||||||
|
&& echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
||||||
|
&& apk add --no-cache opencc@testing git \
|
||||||
|
&& ln -s $(find / -name "libopencc.so.1*" -print -quit) /usr/lib/libopencc.so.1 \
|
@ -25,8 +25,6 @@
|
|||||||
|
|
||||||
更新简体文稿之后请手动执行一个脚本生成繁体文稿。(因为 Github Actions 奇怪的问题太多了,还好难测试,还是换成本地构建啦)
|
更新简体文稿之后请手动执行一个脚本生成繁体文稿。(因为 Github Actions 奇怪的问题太多了,还好难测试,还是换成本地构建啦)
|
||||||
|
|
||||||
构建环境需要 python >= 3.7,可以执行 `pip install -r requirements.txt` 来安装依赖。
|
构建环境需要安装 docker, 然后 `docker-compose up` 就可以更新繁体了!
|
||||||
|
|
||||||
然后运行 `./scripts/convert_zh.py` 就可以更新繁体了!
|
|
||||||
|
|
||||||
这个脚本不会覆盖在已有的繁体文件上的更改,更新已经生成过繁体的简体文稿之后会自动合并,不过还是要手动检查一下哦。
|
这个脚本不会覆盖在已有的繁体文件上的更改,更新已经生成过繁体的简体文稿之后会自动合并,不过还是要手动检查一下哦。
|
||||||
|
7
docker-compose.yml
Normal file
7
docker-compose.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
services:
|
||||||
|
convert:
|
||||||
|
container_name: oau-convert
|
||||||
|
build: .
|
||||||
|
volumes:
|
||||||
|
- ".:/app"
|
||||||
|
entrypoint: "./scripts/convert_zh.py"
|
@ -1 +1 @@
|
|||||||
dacf47e2d848513235bda0af91c15e1b18e7cc97
|
8f826c393e75c64e393b74ccdca67330c6462e4e
|
||||||
|
Loading…
Reference in New Issue
Block a user