feat(Dockerfile, .drone.yml, requirements.txt): 增加依赖文件,增加部署脚本
Some checks reported errors
continuous-integration/drone Build encountered an error
continuous-integration/drone/push Build is failing

增加依赖文件,增加部署脚本

Signed-off-by: Ching <loooching@gmail.com>
This commit is contained in:
Ching 2024-02-07 20:06:27 +08:00
parent d0c016090c
commit 056eaaf60d
4 changed files with 55 additions and 0 deletions

20
.drone.yml Normal file
View File

@ -0,0 +1,20 @@
kind: pipeline
type: docker
name: default
steps:
- name: build-and-push
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: git.tunpok.com/ching/python-env
registry: git.tunpok.com
tags: latest
volumes:
- name: dockersock
host:
path: /var/run/docker.sock

1
.gitignore vendored
View File

@ -9,6 +9,7 @@ __pycache__/
# Distribution / packaging
.Python
.python-version
build/
develop-eggs/
dist/

16
Dockerfile Normal file
View File

@ -0,0 +1,16 @@
# 使用自定义 Docker Registry 中的官方 Python 镜像作为基础镜像
FROM git.tunpok.com/python:3.10-alpine
# 设置工作目录
WORKDIR /app
# 将 requirements.txt 复制到容器中
COPY requirements.txt ./
# 安装依赖
RUN pip install --no-cache-dir -r requirements.txt
# 将当前目录下的所有文件复制到容器中
COPY . .
# 省略 CMD 指令,因为这个镜像是作为基础镜像使用

18
requirements.txt Normal file
View File

@ -0,0 +1,18 @@
beautifulsoup4==4.12.2
bleak==0.21.1
bs4==0.0.1
Flask==3.0.0
ipdb==0.13.13
ipython==8.17.2
jedi==0.19.1
Jinja2==3.1.2
loguru==0.7.2
Mastodon.py==1.8.1
numpy==1.26.1
peewee==3.17.0
Pillow==10.1.0
PyYAML==6.0.1
reportlab==4.0.7
requests==2.31.0
redis==4.6.0
sqlite-web==0.6.3