Open bnounours opened 4 years ago
I had the same issue and build the docker image myself. What i did was as follow.
Copy the server/config.yaml.docker file and modify it slightly.
i think important was to set plugins.email.enabled: true
put it as config.yaml besides a custom build script in a git repo.
(could be obsolete with using the environment variable TURTL_CONFIG_OVERRIDE
but i was not much successful with it. I think it expects a json format)
maybe like TURTL_CONFIG_OVERRIDE: '{"plugins": {"email": {"enabled": true, "endpoint": "smtps://yoursmtpserver", "defaults": {}}}}'
to build use a nodejs image and use the script:
stage: build
script:
- git clone https://github.com/turtl/server.git
# use custom config
- rm -f server/config/config.yaml.docker && cp config.yaml server/config/config.yaml.docker
# enable example plugins
- mv server/example-plugins server/plugins
- cd server/plugins
- npm install
artifacts:
paths:
- server/
have it upload your image to your registry
in my docker-compose.yaml on the server defined all these environment variables:
environment:
TURTL_DB_HOST: postgres-db
TURTL_DB_PORT: 5432
TURTL_DB_DATABASE: turtl
TURTL_DB_USER: turtl
TURTL_DB_PASSWORD: turtl
TURTL_APP_SECURE_HASH_SALT: $TURTL_APP_SECURE_HASH_SALT
TURTL_APP_EMAILS_ADMIN: your@email.de
TURTL_APP_EMAILS_INFO: your@email.de
TURTL_APP_EMAILS_INVITES: your@email.de
TURTL_PLUGINS_EMAIL_ENABLED: 'true'
TURTL_PLUGINS_EMAIL_ENDPOINT: 'smtps://yoursmtpserver'
TURTL_APP_API_URL: 'https://$TRAEFIK_DOMAIN'
after that i got e-mails, but the confirmation link did not show anything since it redirects to a http server which you would need, but it was still activated.
hope that helps and might show what is missing.
Hello @lsascha,
Thx for replying :)
Your solution did not work for me, but gave me clue to "my solution".
After having a look at the doc of nodemailer, I found that the first argument which is taken from endpoint in configuration can be an object. After some try I found a configuration working that I put in the config directly
plugins:
plugin_location: '/plugins'
analytics:
enabled: false
email:
enabled: true
endpoint:
host: "localhost"
port: 25
secure: false
tls:
rejectUnauthorized: false
premium:
enabled: false
Of course I still have to force installation of package from this plugin to make this work
Hello,
I try to receive validation email from the server inside the docker. First, the environment variable are not explained in the config.yaml.docker. I finally found that I have to declare
But it did not work because the package for the plugin email was not installed I modified the scripts/install-plugins.sh to put in comment theses 2 lines:
But I had an error with the command pushd.
Finally I changed the Dockerfile to force installation of package
Now the server works but I don't receive any mail. Even on Debug I don't see anything. Somebody can help me to make it work ?