Files
computer-playbook/roles/web-app-friendica/files/Dockerfile
kevinveenbirkenbachandClaude Opus 4.8 97f6679243 fix(friendica): serialise first-run init through a task-slot gate
The upstream entrypoint serialises its first-run init with flock on friendica-init-sync.lock inside the shared /var/www/html, which sits on NFSv4 on this branch; local_lock=flock is silently ignored on vers=4 mounts, the lock contends across replicas over server-side locking and the set -eu entrypoint dies with exit 65 on every worker, pushing all replicas onto the manager. Build a custom image whose entrypoint gate lets only task slot 1 run the init while other slots wait until the volume VERSION matches the image VERSION - the same pattern nextcloud already uses.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 20:50:17 +02:00

9 lines
287 B
Docker

ARG FRIENDICA_IMAGE
ARG FRIENDICA_VERSION
FROM ${FRIENDICA_IMAGE}:${FRIENDICA_VERSION}
COPY friendica-init-gate.sh /usr/local/bin/friendica-init-gate.sh
RUN chmod 0755 /usr/local/bin/friendica-init-gate.sh
ENTRYPOINT ["/usr/local/bin/friendica-init-gate.sh"]
CMD ["apache2-foreground"]