Giter Site home page Giter Site logo

Comments (4)

rroemhild avatar rroemhild commented on July 17, 2024 1

Hi, this should be fixed in 563e57a and on docker hub :latest. Just replace dashes with underscores like the dots, i.E EJABBERD_SSLCERT_WWW_EXAMPLE_DOMAIN_COM for www.example-domain.com.

from docker-ejabberd.

RikuXan avatar RikuXan commented on July 17, 2024

Unfortunately, it seems that there is another error, that prevents dashed domains from working. I tried it with underscores instead of the dashes with your latest version and it did recognize it correctly and jumped into the write_file_from_env() function as I could see the output in my log, however the generated certificate (/opt/ejabberd/ssl/example-domain.com.pem) did not contain the certificate data, but rather the path that I set the env variable EJABBERD_SSLCERT_WWW_EXAMPLE_DOMAIN_COM to.

I'm not sure whether or not this worked at some point, I'm getting an error though.
I think changing the echo in scripts/pre/01_write_certifiates_from_env.sh line 17 to a cat would fix this.

from docker-ejabberd.

rroemhild avatar rroemhild commented on July 17, 2024

The environment variables for passing sslcerts to the container should include the cert & key and not a path to a local file. The script runs in container on startup an can not look outside of the container. But you can mount a local ssl directory into the container with your ssl certificates.

In example with docker-compose.yml:

ejabberd:                                                                      
  image: rroemhild/ejabberd
  ports:                                                                       
    - 5222:5222                                                                
    - 5269:5269                                                                
    - 5280:5280                                                                
  environment:                                                                 
    - ERLANG_NODE=localhost                                                    
    - XMPP_DOMAIN=example-domain.com                                              
    - [email protected]                                   
    - [email protected] :password4321                          
    - EJABBERD_AUTH_METHOD=internal                                            
    - "EJABBERD_SSLCERT_EXAMPLE_DOMAIN_COM=-----BEGIN CERTIFICATE-----                                                                           
MIIFAzCCAuugAwIBAgIJAJoO+f1lEf0rMA0GCSqGSIb3DQEBCwUAMBgxFjAUBgNV               
BAMMDWxvY2FsLWhvc3QuZGUwHhcNMTYwNTE3MjAzNjI5WhcNMTcwNTE3MjAzNjI5               
WjAYMRYwFAYDVQQDDA1sb2NhbC1ob3N0LmRlMIICIjANBgkqhkiG9w0BAQEFAAOC               
...                    
-----END CERTIFICATE-----                                                      
-----BEGIN PRIVATE KEY-----                                                    
MIIJRAIBADANBgkqhkiG9w0BAQEFAASCCS4wggkqAgEAAoICAQCcCPEU+PuD+zyk               
xN4icj9LNpzWZnckYbiYG/94IQCv7Uj/H0j6vH5BTMwSJeppjT0neVgrdDPYWrCb               
...
-----END PRIVATE KEY-----"

from docker-ejabberd.

RikuXan avatar RikuXan commented on July 17, 2024

Ah ok, then I misunderstood how it is supposed to work. I mounted a volume on a local directory and wrote the path to this file in the variable. All good then, thank you!

from docker-ejabberd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.