diff --git a/blueprints/seafile/docker-compose.yml b/blueprints/seafile/docker-compose.yml new file mode 100644 index 00000000..74636b62 --- /dev/null +++ b/blueprints/seafile/docker-compose.yml @@ -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: +# +# !!! 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: diff --git a/blueprints/seafile/seafile.svg b/blueprints/seafile/seafile.svg new file mode 100644 index 00000000..e1c51659 --- /dev/null +++ b/blueprints/seafile/seafile.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/blueprints/seafile/template.toml b/blueprints/seafile/template.toml new file mode 100644 index 00000000..8e115b73 --- /dev/null +++ b/blueprints/seafile/template.toml @@ -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}" diff --git a/meta.json b/meta.json index 35da784c..06c549cb 100644 --- a/meta.json +++ b/meta.json @@ -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",