Skip to content

Commit

Permalink
Add an example showing the use of MySQL + Socket from the host system.
Browse files Browse the repository at this point in the history
  • Loading branch information
blizzard4591 committed Aug 15, 2022
1 parent 1b7d93d commit 4f9f52d
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions docker-compose-mysql-socket.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
version: '2'

services:
mailman-core:
image: maxking/mailman-core:0.4
container_name: mailman-core
hostname: mailman-core
volumes:
- /opt/mailman/core:/opt/mailman/
- /var/run/mysqld/mysqld.sock:/opt/db.sock
stop_grace_period: 30s
environment:
- MTA=postfix
- DATABASE_URL=mysql+pymysql://mailman:[email protected]/mailmandb?charset=utf8mb4&use_unicode=1&unix_socket=/opt/db.sock
- DATABASE_TYPE=mysql
- DATABASE_CLASS=mailman.database.mysql.MySQLDatabase
- HYPERKITTY_API_KEY=someapikey
ports:
- "127.0.0.1:8001:8001" # API
- "127.0.0.1:8024:8024" # LMTP - incoming emails
networks:
mailman:

mailman-web:
image: maxking/mailman-web:0.4
container_name: mailman-web
hostname: mailman-web
links:
- mailman-core:mailman-core
volumes:
- /opt/mailman/web:/opt/mailman-web-data
- /var/run/mysqld/mysqld.sock:/opt/db.sock
environment:
- DATABASE_TYPE=mysql
- DATABASE_URL=mysql://mailman:mailmanpass@%2Fopt%2Fdb.sock/mailmandb?charset=utf8mb4&unix_socket=/opt/db.sock
- HYPERKITTY_API_KEY=someapikey
- SECRET_KEY=thisisaverysecretkey
- DYLD_LIBRARY_PATH=/usr/local/mysql/lib/
ports:
- "127.0.0.1:8000:8000" # HTTP
- "127.0.0.1:8080:8080" # uwsgi
networks:
mailman:

networks:
mailman:
driver: bridge
ipam:
driver: default
config:
-
subnet: 172.19.199.0/24

0 comments on commit 4f9f52d

Please sign in to comment.