dunglas / mercure

🪽 An open, easy, fast, reliable and battery-efficient solution for real-time communications
https://mercure.rocks
GNU Affero General Public License v3.0
3.83k stars 278 forks source link

Error: reading config from file: open /etc/caddy/Caddyfile.dev: no such file or directory #919

Closed Chris53897 closed 2 weeks ago

Chris53897 commented 2 weeks ago

I just updated the docker images and now i got the error. Mac M1 Silicon The last working images was around 14 days old.

Error: reading config from file: open /etc/caddy/Caddyfile.dev: no such file or directory

sayou commented 2 weeks ago

I also faced the same problem and I don't know what happened Which made me change the code to the following

mercure:
        image: dunglas/mercure
        restart: unless-stopped
        ports:
            - 8082:8082
        networks:
            - dev
        environment:
            SERVER_NAME: ':8082'
            MERCURE_PUBLISHER_JWT_KEY: '!ChangeThisMercureHubJWTSecretKey!'
            MERCURE_SUBSCRIBER_JWT_KEY: '!ChangeThisMercureHubJWTSecretKey!'
            # Set the URL of your Symfony project (without trailing slash!) as value of the cors_origins directive
            MERCURE_EXTRA_DIRECTIVES: |
                cors_origins http://localhost
                anonymous
        # Comment the following line to disable the development mode
        #command: /usr/bin/caddy run --config /etc/caddy/Caddyfile.dev
        volumes:
            - mercure_data:/data
            - mercure_config:/config
bogumilPiotrowski commented 2 weeks ago

Faced the same issue. It seems like in the new release, the config file has been renamed to dev.Caddyfile instead of Caddyfile.dev.

/usr/bin/caddy run --config /etc/caddy/dev.Caddyfile

Check https://mercure.rocks/docs/hub/install