Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Data/config file errors when using Docker volumes (and fly.io) #14122

Open
Nezteb opened this issue Oct 10, 2022 · 0 comments
Open

Data/config file errors when using Docker volumes (and fly.io) #14122

Nezteb opened this issue Oct 10, 2022 · 0 comments
Labels
A-Config Configuration, or the documentation thereof A-Docker Docker images, or making it easier to run Synapse in a container. T-Other Questions, user support, anything else.

Comments

@Nezteb
Copy link

Nezteb commented Oct 10, 2022

I've already used the generate command to get a valid homeserver.yaml file (which I then pulled from the local volume on my machine).

My Dockerfile:

FROM matrixdotorg/synapse:v1.68.0

ENV SYNAPSE_SERVER_NAME=matrix.my.domain
ENV SYNAPSE_REPORT_STATS=no

WORKDIR /data
COPY homeserver.yaml .
RUN chown -R $UID:$GID .

However, when trying to run, I get the following error:

Config file '/data/homeserver.yaml' does not exist.

I am deploying on https://fly.io/; I have a volume mount for /data that I'm pretty sure is empty (I deleted and recreated it several times), but I am not able to write to the volume directly because Fly does not allow that. The application has to do all writing, but I don't think Synapse supports this with this config file setup?

I figured I could set SYNAPSE_CONFIG_DIR env var to /config (and then change WORKDIR /data to WORKDIR /config) so that it wouldn't conflict with the volume, but that gives me another error:

PermissionError: [Errno 13] Permission denied: '/data/matrix.my.domain.log.config'
[info] Generating log config file /data/matrix.my.domain.log.config which will log to /data/homeserver.log

So then I try editing homeserver.yaml and changing log_config: "/data/matrix.my.domain.log.config" to log_config: "/config/matrix.my.domain.log.config", but all that does is change the error path:

PermissionError: [Errno 13] Permission denied: '/config/matrix.my.domain.log.config'
[info] Generating log config file /config/matrix.my.domain.log.config which will log to /config/homeserver.log

If anyone has any ideas for me to try, I'd appreciate it! 😄

@Nezteb Nezteb changed the title Data/config file errors when using Docker volumes Data/config file errors when using Docker volumes (and fly.io) Oct 10, 2022
@DMRobertson DMRobertson added A-Docker Docker images, or making it easier to run Synapse in a container. A-Config Configuration, or the documentation thereof T-Other Questions, user support, anything else. labels Oct 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Config Configuration, or the documentation thereof A-Docker Docker images, or making it easier to run Synapse in a container. T-Other Questions, user support, anything else.
Projects
None yet
Development

No branches or pull requests

2 participants