diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..ddc168a --- /dev/null +++ b/.drone.yml @@ -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 diff --git a/.gitignore b/.gitignore index 5d381cc..76f0ca4 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ __pycache__/ # Distribution / packaging .Python +.python-version build/ develop-eggs/ dist/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a45124c --- /dev/null +++ b/Dockerfile @@ -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 指令,因为这个镜像是作为基础镜像使用 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..190b820 --- /dev/null +++ b/requirements.txt @@ -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