fix: use entrypoint copy pattern for all Colima file-mount issues

Colima's VirtioFS mounts files as directories, breaking direct
file-to-file bind mounts. Fix: mount host dir to /mnt/*-config,
then copy files to target path in entrypoint before exec'ing
the actual process.

Affected services: SearXNG, VictoriaMetrics, Loki, vmalert,
Alertmanager, Synapse

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-03-29 15:15:19 +02:00
parent 0c7a080cf8
commit 2874e202ea

View file

@ -696,8 +696,12 @@ services:
depends_on:
postgres:
condition: service_healthy
entrypoint: >
sh -c "mkdir -p /config &&
cp /mnt/synapse-config/*.yaml /config/ 2>/dev/null;
cp -r /mnt/synapse-config/appservices /config/ 2>/dev/null;
exec python -m synapse.app.homeserver -c /config/homeserver.yaml"
environment:
SYNAPSE_CONFIG_PATH: /config/homeserver.yaml
TZ: Europe/Berlin
SYNAPSE_DB_PASSWORD: ${SYNAPSE_DB_PASSWORD:-synapse-secure-password}
SYNAPSE_PASSWORD_PEPPER: ${SYNAPSE_PASSWORD_PEPPER:-change-me-pepper}
@ -706,7 +710,7 @@ services:
SYNAPSE_REGISTRATION_SECRET: ${SYNAPSE_REGISTRATION_SECRET:-change-me-registration-secret}
SYNAPSE_OIDC_CLIENT_SECRET: ${SYNAPSE_OIDC_CLIENT_SECRET}
volumes:
- ./docker/matrix/config:/config:ro
- ./docker/matrix/config:/mnt/synapse-config:ro
- ./docker/matrix/data:/data
ports:
- "4000:8008"