🔧 Add docker integration

This commit is contained in:
kotoriのねこ 2022-10-27 07:13:57 -05:00 committed by GitHub
parent aca5271fad
commit d3a0da3d9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 78 additions and 0 deletions

60
.dockerignore Normal file
View File

@ -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

18
Dockerfile Normal file
View File

@ -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"]