I set up Seafile behind a Traefik reverse proxy, but I can not access it. When I try to access the domain I get error 521 from Cloudflare.
This is my docker-compose.yml:
services:
db:
image: mariadb:latest
container_name: db
hostname: db
environment:
- MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD # Requested, set the root's password of MySQL service.
- MYSQL_LOG_CONSOLE=true
volumes:
- seafile-db:/var/lib/mysql # Requested, specifies the path to MySQL data persistent store.
networks:
- seafile
memcached:
image: memcached:1.5.6
container_name: seafile-memcached
entrypoint: memcached -m 256
networks:
- seafile
seafile:
image: seafileltd/seafile-mc:latest
container_name: seafile
hostname: seafile
volumes:
- seafile-data:/shared
environment:
- DB_HOST=db
- DB_ROOT_PASSWD=$MYSQL_ROOT_PASSWORD # Requested, the value should be root's password of MySQL service.
- TIME_ZONE=Europe/Berlin # Optional, default is UTC. Should be uncomment and set to your local time zone.
- SEAFILE_ADMIN_EMAIL=$SEAFILE_ROOT_USERNAME # Specifies Seafile admin user, default is 'me@example.com'.
- SEAFILE_ADMIN_PASSWORD=$SEAFILE_ROOT_PASSWORD # Specifies Seafile admin password, default is 'asecret'.
- SEAFILE_SERVER_LETSENCRYPT=false # Whether to use https or not.
- SEAFILE_SERVER_HOSTNAME=$SEAFILE_HOST_NAME # Specifies your host name if https is enabled.
depends_on:
- db
- memcached
networks:
- traefik
- seafile
labels:
- "traefik.enable=true"
#- "traefik.http.routers.seafile.rule=Host(`cloud.x.y`)"
#- "traefik.http.routers.seafile.entrypoints=websecure"
#- "traefik.http.routers.seafile.tls.certresolver=myresolver"
#- "traefik.http.services.seafile.loadbalancer.server.port=8000"
- "traefik.docker.network=traefik"
- "traefik.seafgui.frontend.rule=Host(`cloud.x.y`)"
- "traefik.seafgui.backend=seafile webapp"
- "traefik.seafgui.port=8000"
- "traefik.seafdav.frontend.rule=Host:cloud.x.y;PathPrefix:/dav"
- "traefik.seafdav.backend=seafile dav"
- "traefik.seafdav.port=8080"
- "traefik.seafhttp.frontend.rule=Host:cloud.x.y;PathPrefixStrip:/seafhttp"
- "traefik.seafhttp.backend=seafile server"
- "traefik.seafhttp.port=8082"
#volumes
volumes:
seafile-data:
seafile-db:
# networks
networks:
traefik:
external: true
seafile:
In my Traefik UI I can see that Traefik recognizes those labels and creates the relevant router.
This is my Docker output:
Starting db ... done
Starting seafile-memcached ... done
Recreating seafile ... done
Attaching to db, seafile-memcached, seafile
seafile | *** Running /etc/my_init.d/01_create_data_links.sh...
seafile | *** Booting runit daemon...
db | 2021-12-19 15:19:30+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.5+maria~focal started.
seafile | *** Runit started as PID 24
seafile | *** Running /scripts/enterpoint.sh...
seafile | 2021-12-19 16:19:33 Nginx ready
db | 2021-12-19 15:19:31+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
seafile | 2021-12-19 16:19:33 This is a idle script (infinite loop) to keep container running.
db | 2021-12-19 15:19:31+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.5+maria~focal started.
seafile | [12/19/2021 16:19:33][upgrade]: The container was recreated, running minor-upgrade.sh to fix the media symlinks
seafile | [12/19/2021 16:19:33][upgrade]: Running script /opt/seafile/seafile-server-8.0.7/upgrade/minor-upgrade.sh
db | 2021-12-19 15:19:31 0 [Note] mariadbd (server 10.6.5-MariaDB-1:10.6.5+maria~focal) starting as process 1 ...
seafile |
seafile | -------------------------------------------------------------
seafile | This script would do the minor upgrade for you.
seafile | Press [ENTER] to contiune
db | 2021-12-19 15:19:31 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
seafile | -------------------------------------------------------------
seafile |
db | 2021-12-19 15:19:31 0 [Note] InnoDB: Number of pools: 1
db | 2021-12-19 15:19:31 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
db | 2021-12-19 15:19:31 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
seafile |
seafile | renaming the gunicorn.conf to gunicorn.conf.py ...
seafile |
db | 2021-12-19 15:19:31 0 [Note] InnoDB: Using Linux native AIO
seafile | Done
db | 2021-12-19 15:19:31 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
seafile |
seafile | ------------------------------
seafile | migrating avatars ...
seafile |
db | 2021-12-19 15:19:31 0 [Note] InnoDB: Completed initialization of buffer pool
db | 2021-12-19 15:19:33 0 [Note] InnoDB: 128 rollback segments are active.
seafile |
seafile | DONE
seafile | ------------------------------
seafile |
db | 2021-12-19 15:19:33 0 [Note] InnoDB: Creating shared tablespace for temporary tables
seafile |
seafile | Moving the elasticsearch's configuration file ...
seafile |
db | 2021-12-19 15:19:33 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
seafile |
seafile | updating seafile-server-latest symbolic link to /opt/seafile/seafile-server-8.0.7 ...
seafile |
db | 2021-12-19 15:19:33 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
seafile | DONE
seafile | ------------------------------
seafile |
db | 2021-12-19 15:19:33 0 [Note] InnoDB: 10.6.5 started; log sequence number 736092; transaction id 731
seafile |
db | 2021-12-19 15:19:33 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
db | 2021-12-19 15:19:33 0 [Note] Plugin 'FEEDBACK' is disabled.
db | 2021-12-19 15:19:33 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.
seafile | Starting seafile server, please wait ...
db | 2021-12-19 15:19:33 0 [Note] Server socket created on IP: '0.0.0.0'.
db | 2021-12-19 15:19:33 0 [Note] Server socket created on IP: '::'.
seafile | ** Message: 16:19:33.987: seafile-controller.c(536): No seafevents.
seafile |
db | 2021-12-19 15:19:33 0 [Warning] 'proxies_priv' entry '@% root@db' ignored in --skip-name-resolve mode.
db | 2021-12-19 15:19:33 0 [Note] mariadbd: ready for connections.
db | Version: '10.6.5-MariaDB-1:10.6.5+maria~focal' socket: '/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
db | 2021-12-19 15:19:33 3 [Warning] Aborted connection 3 to db: 'unconnected' user: 'root' host: '172.21.0.4' (Got an error reading communication packets)
db | 2021-12-19 15:19:34 0 [Note] InnoDB: Buffer pool(s) load completed at 211219 15:19:34
seafile | Seafile server started
seafile |
seafile | Done.
seafile |
seafile | Starting seahub at port 8000 ...
seafile |
seafile | Seahub is started
seafile |
seafile | Done.
seafile |
What am I doing wrong? I also tried activating the Cloudflare developer mode thinking this was a caching bug, but that did not help either.