feat(blueprint): added seafile (#135)

* feat(blueprint): added seafile

* fix: quote strings

* fix: quote all strings for seafile template.toml

* docs: seafile notes for deployment and configs

* docs: tweak wording for seafile domain change

* fix(seafile): default logging to stdout

* fix: switch to named volumes

* fix: improve security with generated passwords

* chore: remove unused volume env

* chore: remove outdated docs

* docs: updated seafile domain change instructions to be within container

* docs: further tweaks to seafile docker-compose instructions

* docs: remove section on domain configurations

---------

Co-authored-by: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
This commit is contained in:
Khiet Tam Nguyen
2025-06-02 06:57:44 +10:00
committed by GitHub
parent 72744d1166
commit fcdd2de945
4 changed files with 133 additions and 0 deletions

View File

@@ -0,0 +1,95 @@
# https://manual.seafile.com/12.0/setup/setup_ce_by_docker
#
# This Dokploy template for seafile sets the default credentials to:
# USERNAME: admin@example.com
# PASSWORD: <SECRET GENERATED IN ENVIRONMENT VARIABLES>
#
# !!! IMPORTANT !!!
# Please look at the environment variable settings and tweak
# them prior to the first deployment!
#
# If you have already deployed once, changes to some environment
# variables may not take effect. For example, initial passwords.
services:
seafile-db:
image: mariadb:10.11
environment:
- MYSQL_ROOT_PASSWORD=${INIT_SEAFILE_MYSQL_ROOT_PASSWORD:-}
- MYSQL_LOG_CONSOLE=true
- MARIADB_AUTO_UPGRADE=1
volumes:
- seafile-mysql-db:/var/lib/mysql"
networks:
- seafile-net
healthcheck:
test:
[
"CMD",
"/usr/local/bin/healthcheck.sh",
"--connect",
"--mariadbupgrade",
"--innodb_initialized",
]
interval: 20s
start_period: 30s
timeout: 5s
retries: 10
memcached:
image: memcached:1.6.29
entrypoint: memcached -m 256
networks:
- seafile-net
healthcheck:
test:
[
"CMD-SHELL",
'bash -c "echo version | (exec 3<>/dev/tcp/localhost/11211; cat >&3; timeout 0.5 cat <&3; exec 3<&-)"',
]
interval: 20s
timeout: 5s
retries: 10
seafile:
image: seafileltd/seafile-mc:12.0-latest
volumes:
- seafile-data:/shared
environment:
- DB_HOST=${SEAFILE_MYSQL_DB_HOST:-seafile-db}
- DB_PORT=${SEAFILE_MYSQL_DB_PORT:-3306}
- DB_USER=${SEAFILE_MYSQL_DB_USER:-seafile}
- DB_ROOT_PASSWD=${INIT_SEAFILE_MYSQL_ROOT_PASSWORD:-}
- DB_PASSWORD=${SEAFILE_MYSQL_DB_PASSWORD:?Variable is not set or empty}
- SEAFILE_MYSQL_DB_CCNET_DB_NAME=${SEAFILE_MYSQL_DB_CCNET_DB_NAME:-ccnet_db}
- SEAFILE_MYSQL_DB_SEAFILE_DB_NAME=${SEAFILE_MYSQL_DB_SEAFILE_DB_NAME:-seafile_db}
- SEAFILE_MYSQL_DB_SEAHUB_DB_NAME=${SEAFILE_MYSQL_DB_SEAHUB_DB_NAME:-seahub_db}
- TIME_ZONE=${TIME_ZONE:-Etc/UTC}
- INIT_SEAFILE_ADMIN_EMAIL=${INIT_SEAFILE_ADMIN_EMAIL:-me@example.com}
- INIT_SEAFILE_ADMIN_PASSWORD=${INIT_SEAFILE_ADMIN_PASSWORD:-asecret}
- SEAFILE_SERVER_HOSTNAME=${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty}
- SEAFILE_SERVER_PROTOCOL=${SEAFILE_SERVER_PROTOCOL:-http}
- SITE_ROOT=${SITE_ROOT:-/}
- NON_ROOT=${NON_ROOT:-false}
- JWT_PRIVATE_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty}
- SEAFILE_LOG_TO_STDOUT=${SEAFILE_LOG_TO_STDOUT:-true}
depends_on:
seafile-db:
condition: service_healthy
memcached:
condition: service_started
networks:
- seafile-net
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:80/api2/ping"]
interval: 20s
timeout: 5s
retries: 10
networks:
seafile-net:
name: seafile-net
volumes:
seafile-mysql-db:
seafile-data:

View File

@@ -0,0 +1 @@
<svg enable-background="new 0 0 1024 1024" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><circle cx="512" cy="512" fill="#ffa10f" r="512"/><path d="m221.2 466c0-9.6 7.7-17.2 17.2-17.2 4.8 0 8.6 1.9 11.5 4.8 0-1.9 0-2.9 0-4.8 0-32.6 25.9-58.5 58.5-58.5 8.6 0 16.3 1.9 24 4.8 0-1.9 0-2.9 0-4.8 0-48.9 39.3-88.2 88.2-88.2 47.9 0 87.2 39.3 88.2 87.2-16.3 14.4-28.7 31.6-36.4 51.7-15.3-9.6-34.5-15.3-53.7-15.3-41.2 0-76.7 23-93 58.5h-63.2-24c-9.7-.9-17.3-8.6-17.3-18.2zm462.8-52.7c-22-22-51.7-35.5-85.3-35.5-60.4 0-111.2 45-118.8 103.5-15.3-20.1-39.3-32.6-66.1-32.6-45 0-82.4 36.4-82.4 82.4 0 13.4 2.9 25.9 8.6 36.4-28.7 5.7-49.8 27.8-49.8 54.6 0 30.7 28.7 55.6 64.2 55.6 15.3 0 29.7-4.8 41.2-13.4l132.2-129.3c14.4-13.4 33.5-21.1 55.6-21.1 45 0 80.5 35.5 82.4 79.5 1 13.4-5.7 25.9-19.2 33.5-17.2 10.5-39.3 4.8-48.9-11.5-9.6-17.2-2.9-38.3 14.4-48.9 3.8-1.9 8.6-3.8 12.5-4.8-3.8-1-7.7-1-11.5-1-32.6 0-58.5 25.9-58.5 58.5s25.9 58.5 58.5 58.5h3.8 1.9 115c35.5-1.9 69-33.5 69-73.8 0-40.2-34.5-73.8-74.7-73.8-6.7 11.5-14.4 18.2-24 25.9 9.6-17.2 15.3-36.4 15.3-57.5.1-33.4-13.3-63.1-35.4-85.2z" fill="#fff"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,24 @@
[variables]
main_domain = "${domain}"
mysql_root_password = "${password:32}"
mysql_user_password = "${password:32}"
admin_password = "${password:32}"
jwt_private_key = "${password:32}"
[[config.domains]]
serviceName = "seafile"
port = 80
host = "${main_domain}"
[config.env]
SEAFILE_MYSQL_DB_HOST = "seafile-db"
SEAFILE_MYSQL_DB_USER = "seafile"
SEAFILE_MYSQL_DB_PASSWORD = "${mysql_user_password}"
INIT_SEAFILE_MYSQL_ROOT_PASSWORD = "${mysql_root_password}"
TIME_ZONE = "Etc/UTC"
JWT_PRIVATE_KEY = "${jwt_private_key}"
SEAFILE_SERVER_PROTOCOL = "https"
SEAFILE_SERVER_HOSTNAME = "${main_domain}"
INIT_SEAFILE_ADMIN_EMAIL = "admin@example.com"
INIT_SEAFILE_ADMIN_PASSWORD = "${admin_password}"

View File

@@ -2423,6 +2423,19 @@
},
"tags": ["analytics"]
},
{
"id": "seafile",
"name": "Seafile",
"version": "12.0-latest",
"description": "Open source cloud storage system for file sync, share and document collaboration",
"logo": "seafile.svg",
"links": {
"github": "https://github.com/haiwen/seafile",
"website": "https://seafile.com",
"docs": "https://manual.seafile.com/12.0"
},
"tags": ["file-manager", "file-sharing", "storage"]
},
{
"id": "flagsmith",
"name": "Flagsmith",