-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an example showing the use of MySQL + Socket from the host system.
- Loading branch information
1 parent
1b7d93d
commit 4f9f52d
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |