jeboehm / docker-mailserver

Docker Mailserver based on the famous ISPMail guide
MIT License
368 stars 97 forks source link

Use a different port than default on another mysql #142

Closed osalavie closed 2 years ago

osalavie commented 2 years ago

How can i config the port for connect to remote mysql database which didn't use default port (3306).

fourhundredfour commented 2 years ago

Hey,

you can change the port by changing the environment variable DATABASE_URL in web service.

Current url:

mysql://%env(MYSQL_USER)%:%env(MYSQL_PASSWORD)%@%env(MYSQL_HOST)%:3306/%env(MYSQL_DATABASE)%?serverVersion=mariadb-10.4.11
jeboehm commented 2 years ago

Postfix (mta) & Dovecot (mda) would fail doing this. Non default mysql ports are currently not supported.

jeboehm commented 2 years ago

Fixed in the next upstream version. Just set the MYSQL_PORT environment variable