Error response from daemon: Cannot link to a non running container: /959ea00ad040_nextcloud_db_1 AS /nextcloud_app_1/db_1
Source: only container db was recreated, so it gets new id.
Solution: put explicit names to your containers:
version: '2.4' services: db: container_name: db image: postgres:12-alpine ... onlyoffice: container_name: onlyoffice image: onlyoffice/documentserver:latest ... redis: container_name: redis image: redis:alpine3.11 ... app: container_name: app image: nextcloud:26 depends_on: - db - redis links: - db - redis - onlyoffice ...