mirror of
https://github.com/haiwen/seafile-admin-docs.git
synced 2025-12-26 02:32:50 +00:00
Correct race condition that prevents server from working after reboot
When Docker is managing the startup of containers, the existing seafile-server.yml is failing to come up properly due to a race condition: the MySQL container is up, but not yet ready to accept connections and it's causing the process in the server container to die. Since a proper healthcheck already exists in the compose file, this PR adds the correct status check for db and makes the memcached one more verbose in case anyone wants to implement a health check there as well. Someone should also probably look into making the server more fault tolerant of db errors, but this solves the problem for today.
This commit is contained in:
parent
0dffcd841e
commit
2e3daee720
|
|
@ -62,11 +62,13 @@ services:
|
|||
caddy: ${SEAFILE_SERVER_PROTOCOL:-http}://${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty}
|
||||
caddy.reverse_proxy: "{{upstreams 80}}"
|
||||
depends_on:
|
||||
- db
|
||||
- memcached
|
||||
db:
|
||||
condition: service_healthy
|
||||
memcached:
|
||||
condition: service_started
|
||||
networks:
|
||||
- seafile-net
|
||||
|
||||
networks:
|
||||
seafile-net:
|
||||
name: seafile-net
|
||||
name: seafile-net
|
||||
|
|
|
|||
Loading…
Reference in New Issue