Bob, For mailman-core, I use this:
environment: - DATABASE_URL=mysql+pymysql://mailman:[realstrongpassword]@database/mailmandb ?charset=utf8mb4&use_unicode=1 - DATABASE_TYPE=mysql - DATABASE_CLASS=mailman.database.mysql.MySQLDatabase - HYPERKITTY_API_KEY=[realstrongkey] - MTA=postfix
For mailman-web, I use this:
environment: - DATABASE_URL=mysql://mailman:[realstrongpassword]@database/mailmandb - DATABASE_TYPE=mysql
Pymysql should be installed in the container(s) via the image. You
shouldn't have to do it. If your environment variables are complete and correct in docker-compose.yaml, you should have to interactively configure anything within either container. It is all done at creation/boot time.
You might want to run "docker logs mailman-core" after starting the
container. Just to see what it is saying about the database connection. In my case, it wasn't working, due to an invalid character in the password. You'd never know unless you look at those logs.
-----Original Message----- From: bob B <bader@cchmc.org> Sent: Saturday, October 9, 2021 1:45 AM To: mailman-users@mailman3.org Subject: [MM3-users] Trying to get mailman3 in docker working with external Mysql database
Our database group has created the database with (charset=utf8mb4&use_unicode=1) and a user
For my docker-compose.yaml I will only have two container sections
mailman-core mailman-web
which should have these database variables set under each:
-DATABASE_URL=mysql+pymysql://[database_user]:[database_password]@[database. server.ip]:[databseport]/[database_name]
- DATABASE_TYPE=mysql
- DATABASE_CLASS=mailman.database.mysql.MySQLDatabase
Are these all correct? in looking at documentation should it be:
DATABASE_URL=mysql+pymysql://[database_user]:[database_password]@[database.s erver.ip]:[databseport]/[database_name]?charset=utf8mb4&use_unicode=1
Or/and should I also use?
DATABASE_URL=mysql+pymysql://....
or
DATABASE_URL=mysql://...
or
DATABASE_URL=pymysql://....
Do I have to install pymysql? or is it installed in the dock images?
Do I have to run any other commands on the database first? I assume mailman does everything it needs for the database at first launch?
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/