Files
nexus/wiki/entities/Zipline.md
2026-04-22 08:02:59 +08:00

117 lines
2.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: Zipline
type: entity
tags: [docker, image, zipline, n8n]
date: 2025-12-29
---
# Zipline
## Aliases
- Zipline
- Zipline Image Host
- diced/zipline
## Definition
Zipline 是一个开源的自托管图床应用,提供图片上传 UI 和 REST API支持 S3 兼容存储后端。作为 [[n8n]] 工作流集成的前置条件Zipline 充当自动化图片上传的中间层。
## Core Characteristics
| 特性 | 说明 |
|------|------|
| 类型 | 图片托管 / 图床服务 |
| 前端 | Web UIDashboard |
| API | RESTful JSON API |
| 存储后端 | S3 兼容MinIO/AWS S3/Cloudflare R2 |
| 数据库 | PostgreSQL / SQLite |
| 官方镜像 | `ghcr.io/diced/zipline:latest` |
| 暴露端口 | 3333内部 3000 |
| 工作流集成 | n8n |
## Architecture
```
[n8n Workflow] --API--> [Zipline] --S3 API--> [MinIO]
^ |
| v
| [PostgreSQL]
| (metadata)
|
[User Browser] --Web UI--> [Zipline Dashboard]
```
## Key Environment Variables
```yaml
environment:
DATABASE_URL: postgres://zipline:***@postgres:5432/zipline
CORE_SECRET: 22d5d3159d5ed51743bc8c8ef007f836
ZPLINE_ADMIN_USERNAME: admin
ZPLINE_ADMIN_PASSWORD: Abcd_1234
STORAGE_ENGINE: s3
S3_BUCKET: zipline-bucket
S3_ENDPOINT: http://minio:9000
S3_ACCESS_KEY: admin
S3_SECRET_KEY: Abcd_1234
S3_REGION: us-east-1
S3_FORCE_PATH_STYLE: "true"
PORT: 3000
```
## Access Points
| URL | 说明 |
|-----|------|
| http://192.168.3.17:3333 | Zipline Web UI |
| http://192.168.3.17:3333/dashboard | Dashboard登录后 |
| http://192.168.3.17:9001 | MinIO Console |
## Docker Dependencies
```yaml
zipline:
image: ghcr.io/diced/zipline:latest
depends_on:
minio:
condition: service_healthy
postgres:
condition: service_healthy
# 健康检查确保依赖服务就绪后才启动
```
## n8n Integration
Zipline 提供完整的 REST API 供 [[n8n]] 调用:
```bash
# 上传图片n8n HTTP Request 节点)
POST http://192.168.3.17:3333/api/upload
Headers:
Content-Type: multipart/form-data
X-API-Key: <your-api-token>
```
## Features
- [x] 前端图片上传 Web UI
- [x] API Token 认证
- [x] S3 兼容存储后端
- [x] [[n8n]] 工作流集成
- [x] 图片 URL 直接访问Public Bucket
- [x] 上传规则配置
- [x] 返回 URL 配置
## Connections
- [[MinIO]] ← stores files ← [[Zipline]]
- [[PostgreSQL]] ← stores metadata ← [[Zipline]]
- [[n8n]] ← calls ← [[Zipline API]]
- [[群晖 NAS]] ← hosts ← [[Zipline]]
- [[Docker堆栈]] ← part of ← [[Zipline]]
## Related Concepts
- [[图床]]
- [[S3-兼容对象存储]]
- [[Docker堆栈]]
- [[逻辑备份]]
- [[数据一致性]]