Skip to content

Commit fdba096

Browse files
blizzard4591Jana Berger
authored and
Jana Berger
committed
Add an example showing the use of MySQL + Socket from the host system.
1 parent 1779fbd commit fdba096

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

docker-compose-mysql-socket.yaml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
version: '2'
2+
3+
services:
4+
mailman-core:
5+
image: maxking/mailman-core:0.4
6+
container_name: mailman-core
7+
hostname: mailman-core
8+
volumes:
9+
- /opt/mailman/core:/opt/mailman/
10+
- /var/run/mysqld/mysqld.sock:/opt/db.sock
11+
stop_grace_period: 30s
12+
environment:
13+
- MTA=postfix
14+
- DATABASE_URL=mysql+pymysql://mailman:[email protected]/mailmandb?charset=utf8mb4&use_unicode=1&unix_socket=/opt/db.sock
15+
- DATABASE_TYPE=mysql
16+
- DATABASE_CLASS=mailman.database.mysql.MySQLDatabase
17+
- HYPERKITTY_API_KEY=someapikey
18+
ports:
19+
- "127.0.0.1:8001:8001" # API
20+
- "127.0.0.1:8024:8024" # LMTP - incoming emails
21+
networks:
22+
mailman:
23+
24+
mailman-web:
25+
image: maxking/mailman-web:0.4
26+
container_name: mailman-web
27+
hostname: mailman-web
28+
links:
29+
- mailman-core:mailman-core
30+
volumes:
31+
- /opt/mailman/web:/opt/mailman-web-data
32+
- /var/run/mysqld/mysqld.sock:/opt/db.sock
33+
environment:
34+
- DATABASE_TYPE=mysql
35+
- DATABASE_URL=mysql://mailman:mailmanpass@%2Fopt%2Fdb.sock/mailmandb?charset=utf8mb4&unix_socket=/opt/db.sock
36+
- HYPERKITTY_API_KEY=someapikey
37+
- SECRET_KEY=thisisaverysecretkey
38+
- DYLD_LIBRARY_PATH=/usr/local/mysql/lib/
39+
ports:
40+
- "127.0.0.1:8000:8000" # HTTP
41+
- "127.0.0.1:8080:8080" # uwsgi
42+
networks:
43+
mailman:
44+
45+
networks:
46+
mailman:
47+
driver: bridge
48+
ipam:
49+
driver: default
50+
config:
51+
-
52+
subnet: 172.19.199.0/24

0 commit comments

Comments
 (0)