modify dirs

This commit is contained in:
oscarz
2025-03-17 11:53:43 +08:00
parent e1c62f23d3
commit 03b12ba4d4
12 changed files with 172 additions and 0 deletions

View File

@ -0,0 +1,30 @@
---
services:
calibre-web-automated:
image: crocodilestick/calibre-web-automated:latest
container_name: calibre-web-automated
restart: unless-stopped
ports:
# Change the first number to change the port you want to access the Web UI, not the second
- 8083:8083
networks:
- devops
environment:
# Only change these if you know what you're doing
- PUID=1000
- PGID=1000
# Edit to match your current timezone https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
- TZ=Asia/Shanghai # 设置时区
volumes:
# mkdir -p ~/dockers/calibre/{config,cwa-book-ingest,calibre-library}
# CW users migrating should stop their existing CW instance, make a copy of the config folder, and bind that here to carry over all of their user settings ect.
- ~/dockers/calibre/config:/config # 存储 Komga 配置和数据库
# This is an ingest dir, NOT a library one. Anything added here will be automatically added to your library according to the settings you have configured in CWA Settings page. All files placed here are REMOVED AFTER PROCESSING
- ~/dockers/calibre/cwa-book-ingest:/cwa-book-ingest # 你的电子书存储目录EPUB, PDF
# If you don't have an existing library, CWA will automatically create one at the bind provided here
- ~/dockers/calibre/calibre-library:/calibre-library # Komga 日志
networks:
devops:
external: true

View File

@ -0,0 +1,23 @@
# 选择基础镜像,使用 Ubuntu 最新版本
FROM --platform=linux/amd64 ubuntu:latest
# 设置时区,避免交互式输入
ENV DEBIAN_FRONTEND=noninteractive
# 安装基础工具和 开发工具包 build-essential
RUN apt-get update && apt-get install -y \
curl wget git vim build-essential \
&& rm -rf /var/lib/apt/lists/*
# 安装 Golang
RUN wget https://go.dev/dl/go1.22.2.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go1.22.2.linux-amd64.tar.gz && \
rm go1.22.2.linux-amd64.tar.gz
# 配置 Golang 环境变量
ENV PATH="/usr/local/go/bin:${PATH}"
ENV GOPATH="/root/go"
ENV PATH="${GOPATH}/bin:${PATH}"
# 设置默认命令,进入 shell
CMD ["/bin/bash"]

View File

@ -0,0 +1,41 @@
---
services:
golang-dev:
image: golang-dev:latest # 指定了镜像名
build:
context: .
dockerfile: Dockerfile
container_name: golang-dev
restart: unless-stopped
networks:
- devops # 你之前创建的 devops 网络
ports:
- "2080:80"
volumes:
- ~/Documents/codes/golang:/root/projects # 挂载git工程目录
# mkdir -p ~/dockers/golang-dev/{hostdir,go-mod,.ssh}
# touch ~/dockers/golang-dev/.gitconfig
- ~/dockers/golang-dev/hostdir:/root/hostdir # 挂载一个通用的主机目录
- ~/dockers/golang-dev/go-mod:/root/go # 挂载一个go pkg 目录
- ~/dockers/sharedata:/root/sharedata # 挂载一个docker之间共享的目录
- ~/dockers/golang-dev/.ssh:/root/.ssh # 允许 SSH 访问 git 仓库
- ~/dockers/golang-dev/.gitconfig:/root/.gitconfig # 共享 Git 配置文件
environment:
- TZ=Asia/Shanghai # 设置时区
stdin_open: true
tty: true
# docker-compose build # 重新构建镜像
# docker-compose up -d # 运行最新的容器
# docker-compose up -d --build
# docker image prune -f # 批量删除未被容器使用的旧镜像
# docker image prune -a -f # 删除所有未使用的镜像(包括 dangling 和 unreferenced 镜像)
networks:
devops:
external: true # 你已有的 devops 网络

View File

@ -0,0 +1,22 @@
version: "3.8"
services:
komga:
image: gotson/komga:latest
container_name: komga
restart: unless-stopped
networks:
- devops
ports:
- "25600:25600" # 访问地址: http://localhost:25600
environment:
- TZ=Asia/Shanghai # 设置时区
volumes:
# mkdir -p ~/dockers/komga/{config,books,logs}
- ~/dockers/komga/config:/config # 存储 Komga 配置和数据库
- ~/dockers/komga/books:/books # 你的电子书存储目录EPUB, PDF
- ~/dockers/komga/logs:/logs # Komga 日志
networks:
devops:
external: true

View File

@ -0,0 +1,63 @@
version: "3.8"
services:
paperless:
image: ghcr.io/paperless-ngx/paperless-ngx:latest
container_name: paperless
restart: unless-stopped
ports:
- "8000:8000"
environment:
PAPERLESS_OCR_LANGUAGES: "" # 跳过OCR
PAPERLESS_OCR_SKIP_ARCHIVE_FILE: "always" # 跳过创建文档存档版本的时间
PAPERLESS_OCR_OUTPUT_TYPE: "pdf" # 尽量少修改PDF文档
PAPERLESS_CONSUMER_POLLING: "5" # 指定轮询间隔(以秒为单位),这将导致 paperless 定期检查消费目录中的更改
#PAPERLESS_CONSUMER_INOTIFY_DELAY: "2" # 设置消费者等待 inotify 发出的其他事件的时间(以秒为单位)
# 使用 SQLite 作为数据库(默认)
PAPERLESS_DBENGINE: sqlite3
PAPERLESS_DBNAME: /usr/src/paperless/db/paperless.sqlite3
PAPERLESS_REDIS: redis://redis:6379
# 语言和时区设置
PAPERLESS_TIME_ZONE: Asia/Shanghai
PAPERLESS_LANGUAGE: zh-cn
# PDF 处理的目录
PAPERLESS_CONSUMPTION_DIR: /usr/src/paperless/consume
PAPERLESS_DATA_DIR: /usr/src/paperless/data
PAPERLESS_MEDIA_ROOT: /usr/src/paperless/media
PAPERLESS_EXPORT_DIR: /usr/src/paperless/export
# 定义文件命名规则和存储路径
# 作用不大,主要还是用消费后脚本,以及工作流来指定存储路径。
# 工作流先于消费后脚本运行因此消费后脚本里解析的document_type在工作流里无效。所以使用了文件名关键词匹配
PAPERLESS_FILENAME_FORMAT: "{{created}}_{{document_type}}_{{correspondent}}_{{title}}.pdf"
# 解析文件里的关键信息并更新。但无法更新strorage path。这个字段要靠工作流才行。
PAPERLESS_POST_CONSUME_SCRIPT: "/usr/src/paperless/scripts/parse_filename.py"
# 运行用户
USERMAP_UID: 1000
USERMAP_GID: 1000
volumes:
# 存储所有数据搜索索引、SQLite 数据库、分类模型等)的地方
- ~/dockers/paperless/data:/usr/src/paperless/data
# 挂载文件导入目录
- ~/dockers/paperless/consume:/usr/src/paperless/consume
# 挂载文件导出目录
- ~/dockers/paperless/export:/usr/src/paperless/export
# 存储您的文档和缩略图的地方
- ~/dockers/paperless/media:/usr/src/paperless/media
# 挂载脚本,比如 PAPERLESS_POST_CONSUME_SCRIPT
- ~/dockers/paperless/scripts:/usr/src/paperless/scripts
networks:
- devops
networks:
devops:
external: true

32
docker/stock/Dockerfile Normal file
View File

@ -0,0 +1,32 @@
# 使用 Ubuntu 最新的 x86_64 版本
FROM --platform=linux/amd64 ubuntu:latest
# 设置时区,避免交互式输入
ENV DEBIAN_FRONTEND=noninteractive
# 安装必要的系统包和python环境
RUN apt-get update && apt-get install -y \
curl wget git vim unzip nano python3 python3-pip \
&& rm -rf /var/lib/apt/lists/*
# 创建工作目录
WORKDIR /app
# 将 requirements.txt 复制到工作目录
COPY requirements.txt .
# 安装项目依赖
RUN pip3 install -r requirements.txt --break-system-packages
# 设置 Git 配置
RUN git config --global user.name "oscar" && \
git config --global user.email "oscar@easyprompt8.com" && \
git config --global credential.helper store
# 复制 FutuOpenD 安装包(假设你事先下载了 FutuOpenD
# 如果你希望 Docker 自动下载,可以在 ENTRYPOINT 里手动执行
# COPY FutuOpenD.tar.gz /root/
# RUN tar -xzf /root/FutuOpenD.tar.gz -C /root/ && rm /root/FutuOpenD.tar.gz
# 启动时进入 bash 交互模式
CMD ["/bin/bash"]

View File

@ -0,0 +1,38 @@
---
services:
stock:
image: stock:latest # 指定了镜像名
build:
context: .
dockerfile: Dockerfile
container_name: stock
restart: unless-stopped
platform: linux/x86_64 # 强制使用 x86_64 平台
networks:
- devops # 你之前创建的 devops 网络
environment:
- TZ=Asia/Shanghai
ports:
- "1080:80"
volumes:
- ~/Documents/codes/common:/root/projects # 挂载git工程目录
# mkdir -p ~/dockers/stock/{hostdir,config}
- ~/dockers/stock/hostdir:/root/hostdir # 挂载一个通用的主机目录
- ~/dockers/stock/config:/root/config # 挂载一个通用的主机目录
- ~/dockers/sharedata:/root/sharedata # 挂载一个docker之间共享的目录
- ~/dockers/stock/.ssh:/root/.ssh # 允许 SSH 访问 git 仓库
# touch ~/dockers/stock/.gitconfig
- ~/dockers/stock/.gitconfig:/root/.gitconfig # 共享 Git 配置文件
stdin_open: true
tty: true
networks:
devops:
external: true # 你已有的 devops 网络

View File

@ -0,0 +1,11 @@
# 绕过cloudflare限制的包
cloudscraper
requests
beautifulsoup4
lxml
pymysql
# futu openapi 包,以及它依赖的加密库
futu-api
cryptography

View File

@ -0,0 +1,33 @@
---
services:
# main service
talebook:
image: talebook/talebook
restart: unless-stopped
ports:
# Change the first number to change the port you want to access the Web UI, not the second
- 10080:80
- 10443:443
networks:
- devops
# mkdir -p ~/dockers/talebook/{config,data}
volumes:
- ~/dockers/talebook/data:/data
- ~/dockers/talebook/config:/config
environment:
- PUID=1000
- PGID=1000
- TZ=Asia/Shanghai
depends_on:
- douban-rs-api
# optional, for meta plugins
# please set "http://douban-rs-api" in settings
douban-rs-api:
restart: always
image: ghcr.io/cxfksword/douban-api-rs
networks:
devops:
external: true