haiwen / seafile-docker

A Docker image for Seafile server
Other
536 stars 181 forks source link

let is_https in bootstrap.py check a environment flag not SEAFILE_SERVER_LETSENCRYPT #302

Closed yksflip closed 1 month ago

yksflip commented 2 years ago

Hey!

We'd like to use traefik to handle https for our seafile docker setup. Unfortunately it's not possible to overwrite SERVICE_URL and FILE_SERVER_ROOT with the correct protocol (https), because bootstrap.py is_https() check for the SEAFILE_SERVER_LETSENCRYPT, what would also trigger the init_letsencrypt().

It would either be nice to have a seperate PROTOCOL environment variable or let SERVICE_URL and FILE_SERVER_ROOT be overridden from docker-compose.yml.

freeplant commented 1 month ago

Since version 10.0.x, if you want to use a reverse proxy and apply for a certificate outside docker, you can use FORCE_HTTPS_IN_CONF to force write https:// in the configuration file. (https://manual.seafile.com/docker/deploy_seafile_with_docker/#lets-encrypt-ssl-certificate)

You can also manually change the generated config items in the configuration files after the first time you run the docker container.