Docker - upgrade from Seafile 11 to Seafile 12

Anyone lucky enough to successfuly upgrade above version with Caddy? If yes, then please share your solution for switching from nginx reverse-proxy to caddy. I’ve been fighting with this for the passed two days. Logs are useless or no where to be found (caddy). Bad Gateway should be a new logo of seafile server.
Thanks

My answer isn’t exactly what you are asking for, and I hope someone can give you that answer too, but the solution I went for might work well enough for you.

I did almost the opposite of what you are asking. I removed the caddy container, removed the caddy config options from the config files, and added some extra ports to the configs so that I could continue to use my existing and already working nginx config with the new seafile.

My old nginx config was setup to forward to seafile with options like “proxy_pass http://192.168.69.12:8000;” and “proxy_pass http://192.168.69.12:8082;”. I didn’t want to change that since it was working, so I added to those ports to the seafile docker config:

    ports:
      - "8000:8000"
      - "8082:8082"

That way my nginx could talk to seafile the way it always had, instead of trying to go through another nginx inside the container.

1 Like

Sounds sensible enough. Have you posted your configuration (yml) here yet? Could be a big help for a lot of folks moving forward. Many thanks.

I don’t think I have, even though I have posted a lot of parts. My entire setup is a bit complicated for various reasons (using single sign-on OAUTH setup, running in podman with nothing running as root, sharing the reverse proxy with some other programs, etc.). For a detailed description of why some things are as they are, you might be interested in this:

I am not able to ssh to my seafile server at the moment, so I am posting the configs from ansible (which I am learning to use). It is basically the same, except that some values are replaced with variables, which look like “{{ variable_name }}”. So don’t expect any line with a “{{ * }}” to work for you without changes.

My .env:

COMPOSE_FILE='seafile-server.yml,notification-server.yml'
ENABLE_SEADOC=false
COMPOSE_PATH_SEPARATOR=','
NON_ROOT=true

SEAFILE_IMAGE=seafileltd/seafile-mc:{{ seafile_docker_version }}
SEAFILE_VOLUME={{ seafile_volume_path }}

SEAFILE_MYSQL_DB_HOST={{ ansible_host }}
INIT_SEAFILE_MYSQL_ROOT_PASSWORD={{ mysql_root_password }}
SEAFILE_MYSQL_DB_USER=seafile
SEAFILE_MYSQL_DB_PASSWORD={{ seafile_db_password }}

TIME_ZONE=America/Denver
JWT_PRIVATE_KEY={{ jwt_private_key }}

SEAFILE_SERVER_HOSTNAME={{ public_address }}
SEAFILE_SERVER_PROTOCOL=https

NOTIFICATION_SERVER_IMAGE=seafileltd/notification-server:{{ seafile_docker_version }}
NOTIFICATION_SERVER_VOLUME={{ notification_volume_path }}

seafile-server.yml:

services:
  seafile:
    image: ${SEAFILE_IMAGE:-seafileltd/seafile-mc:{{ seafile_docker_version }}}
    container_name: seafile
    restart: always
    ports:
      - "8000:8000"
      - "8082:8082"
    volumes:
      - ${SEAFILE_VOLUME:-/opt/seafile-data}:/shared
    environment:
      - DB_HOST=${SEAFILE_MYSQL_DB_HOST:-db}
      - DB_PORT=${SEAFILE_MYSQL_DB_PORT:-3306}
      - 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}
      - ENABLE_SEADOC=${ENABLE_SEADOC:-false}
      - SEADOC_SERVER_URL=${SEADOC_SERVER_URL:-http://example.example.com/sdoc-server}
    networks:
      - seafile-net

networks:
  seafile-net:
    name: seafile-net

And notification-server.yml:

services:

  notification-server:
    image: ${NOTIFICATION_SERVER_IMAGE:-seafileltd/notification-server:{{ seafile_docker_version }}}
    container_name: notification-server
    restart: always
    volumes:
      - ${NOTIFICATION_SERVER_VOLUME:-/opt/notification-data}:/shared
      - ${NOTIFICATION_SERVER_VOLUME:-/opt/notification-data}/logs:/shared/logs
    ports:
      - "8083:8083"
    environment:
      - SEAFILE_MYSQL_DB_HOST=${SEAFILE_MYSQL_DB_HOST:-db}
      - SEAFILE_MYSQL_DB_PORT=${SEAFILE_MYSQL_DB_PORT:-3306}
      - SEAFILE_MYSQL_DB_USER=${SEAFILE_MYSQL_DB_USER:-seafile}
      - SEAFILE_MYSQL_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}
      - JWT_PRIVATE_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty}
      - SEAFILE_LOG_TO_STDOUT=${SEAFILE_LOG_TO_STDOUT:-false}
      - NOTIFICATION_SERVER_LOG_LEVEL=${NOTIFICATION_SERVER_LOG_LEVEL:-info}
    networks:
      - seafile-net

networks:
  seafile-net:
    name: seafile-net
1 Like

Thanks for your input. I have given up for now, but will come back to it once my life settles down a bit and I have some spare time to deal with this upgrade !@#$.
Cheers,