feat(Dockerfile, .drone.yml, requirements.txt): 增加依赖文件,增加部署脚本
增加依赖文件,增加部署脚本 Signed-off-by: Ching <loooching@gmail.com>
This commit is contained in:
parent
d0c016090c
commit
056eaaf60d
20
.drone.yml
Normal file
20
.drone.yml
Normal 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
1
.gitignore
vendored
@ -9,6 +9,7 @@ __pycache__/
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
.python-version
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
|
||||
16
Dockerfile
Normal file
16
Dockerfile
Normal 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
18
requirements.txt
Normal 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
|
||||
Loading…
x
Reference in New Issue
Block a user