From bf58bd2a2cf7d8718f3a869f43f08253cc14fb7a Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Wed, 28 Oct 2020 22:57:41 +0100 Subject: Some Seafile wizardry to bypass ipv4 only limitations --- .../configuration/seafile/conf/seafile.conf.tpl | 2 +- app/deployment/seafile.hcl | 63 +++++++++++++--------- 2 files changed, 39 insertions(+), 26 deletions(-) (limited to 'app') diff --git a/app/config/configuration/seafile/conf/seafile.conf.tpl b/app/config/configuration/seafile/conf/seafile.conf.tpl index f224234..a6425e9 100644 --- a/app/config/configuration/seafile/conf/seafile.conf.tpl +++ b/app/config/configuration/seafile/conf/seafile.conf.tpl @@ -2,7 +2,7 @@ port = 12001 [fileserver] -port = 8082 +port = 8083 max_upload_size=8192 max_download_dir_size=8192 diff --git a/app/deployment/seafile.hcl b/app/deployment/seafile.hcl index 3a23be0..ede755a 100644 --- a/app/deployment/seafile.hcl +++ b/app/deployment/seafile.hcl @@ -9,6 +9,44 @@ job "seafile" { group "main" { count = 1 + task "hack" { + driver = "docker" + config { + image = "alpine/socat:1.0.5" + network_mode = "host" + command = "tcp6-listen:8085,fork,reuseaddr" + args = [ "tcp-connect:127.0.0.1:8083" ] + } + resources { + memory = 10 + } + service { + tags = [ + "seafile", + "traefik.enable=true", + "traefik.frontend.entryPoints=https,http", + "traefik.frontend.rule=Host:cloud.deuxfleurs.fr;PathPrefixStrip:/seafhttp" + + ] + port = 8085 + address_mode = "driver" + name = "seafhttp" + check { + type = "tcp" + port = 8085 + address_mode = "driver" + interval = "60s" + timeout = "5s" + check_restart { + limit = 3 + grace = "90s" + ignore_warnings = false + } + } + } + + } + task "server" { driver = "docker" config { @@ -61,31 +99,6 @@ job "seafile" { } } - service { - tags = [ - "seafile", - "traefik.enable=true", - "traefik.frontend.entryPoints=https,http", - "traefik.frontend.rule=Host:cloud.deuxfleurs.fr;PathPrefixStrip:/seafhttp" - - ] - port = 8082 - address_mode = "driver" - name = "seafhttp" - check { - type = "tcp" - port = 8082 - address_mode = "driver" - interval = "60s" - timeout = "5s" - check_restart { - limit = 3 - grace = "90s" - ignore_warnings = false - } - } - } - service { tags = [ "seafile", -- cgit v1.2.3