diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..441cfaff --- /dev/null +++ b/.dockerignore @@ -0,0 +1,60 @@ +### Code Editor ### + +# VSCode +.vscode/ +*.code-workspace +.history +.ionide + +# Pycharm +*.iws +.idea/ +out/ + +### Python ### + +# Environments +env/ +venv/ +cache/ +temp/ + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class +*.pyo +*.pyc + +### Customize ### + +**_test.html +test_**.html +logs/ +report/ +data/ +/resources/*/*/test/ +plugins/genshin/daily/daily.json +metadata/data/ +resources/assets/ + +### DotEnv ### +.env + + +### private plugins ### +plugins/private + + +# Unit test / coverage reports +.pytest_cache + +### mtp ### +paimon.session +PaimonBot.session +PaimonBot.session-journal + + +### git ### +.git +.gitignore \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..c86a5da4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM python:3.10.8-slim-bullseye +COPY . /app +WORKDIR /app +RUN pip install virtualenv==20.16.6 poetry==1.2.2 \ + && python3 -m virtualenv venv/ \ + && . venv/bin/activate \ + && poetry install \ + && playwright install chromium \ + && playwright install-deps \ + && apt install -y git \ + && git init . \ + && git add -A \ + && git -c user.name='user' \ + -c user.email='user@example.com' \ + commit -m 'Docker deployment' \ + && mkdir cache/ \ + && rm -rf /var/lib/apt/lists/* +ENTRYPOINT ["venv/bin/python", "./run.py"]