From cf573f0b0f8320ee8f4030fddadb8351ce490fc0 Mon Sep 17 00:00:00 2001 From: Jelly <326lisan@gmail.com> Date: Fri, 10 Apr 2026 09:04:01 +0100 Subject: [PATCH] init --- .env.example | 35 ++++++++++++++++++++++++++++++++++ .gitignore | 1 + docker-compose.yaml | 46 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 .env.example create mode 100644 .gitignore create mode 100644 docker-compose.yaml diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..bd8a269 --- /dev/null +++ b/.env.example @@ -0,0 +1,35 @@ +# ================================================================= +# Pydio Cells 部署环境配置文件示例 (.env.example) +# 备注: +# 1. 变量值建议只包含字母和数字,避免使用 &、$、*、! 等特殊字符, +# 以防止 Shell 解析或 Docker Compose 解析时出现转义错误。 +# 2. 修改此文件后,请重命名为 .env +# ================================================================= + +# --- MariaDB 数据库配置 --- + +# MariaDB root 用户的超级密码 +MYSQL_ROOT_PASSWORD=Kj9mP2vLq8xR7 + +# Cells 专用的数据库名称 +MYSQL_DATABASE=pydiocells + +# Cells 连接数据库使用的用户名 +CELLS_DB_USER=pydio + +# Cells 连接数据库使用的密码 +CELLS_DB_PASSWORD=Xt5nM3wR9kL2 + + +# --- Pydio Cells 服务配置 --- + +# 外部访问域名 (必须包含协议 https,末尾不要带斜杠) +# 如果你配置了 SSL 证书,请确保这里是 https +CELLS_EXTERNAL=https://localhost:8080 +# 站点标签(在浏览器标题栏显示的名称) +CELLS_SITE_LABEL=PydioCellsTest + + +# --- 宿主机端口配置 --- +# 你希望在宿主机上监听的端口 +HOST_PORT=8080 \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4c49bd7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.env diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..e6ff16f --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,46 @@ +services: + mariadb: + image: mariadb:11 + container_name: pydio-mariadb + restart: unless-stopped + environment: + MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} + MYSQL_DATABASE: ${MYSQL_DATABASE} + MYSQL_USER: ${CELLS_DB_USER} + MYSQL_PASSWORD: ${CELLS_DB_PASSWORD} + volumes: + - ./mariadb_data:/var/lib/mysql + networks: + - cells-net + healthcheck: + test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] + interval: 10s + timeout: 5s + retries: 5 + + cells: + image: pydio/cells:latest + container_name: pydio-cells + restart: unless-stopped + ports: + - "${HOST_PORT:-8080}:8080" + environment: + # 注意:正确的环境变量前缀是 CELLS_SITE_ ,而非 CELLS_ + CELLS_SITE_BIND: 0.0.0.0:8080 + CELLS_SITE_EXTERNAL: ${CELLS_EXTERNAL} + # 可选:站点标题 + CELLS_SITE_LABEL: ${CELLS_SITE_LABEL:-Pydio Cells} + volumes: + # 挂载主工作目录(包含 pydio.json 等配置文件) + - ./cells_working:/var/cells + # 数据目录单独挂载(方便备份/迁移) + - ./Storage_data:/var/cells/data + networks: + - cells-net + depends_on: + mariadb: + condition: service_healthy + +networks: + cells-net: + driver: bridge