Get rid of hard coded IPs (#441)

Replace them with:
* containers' hostnames
* gateway's IP address for default SMTP_HOST
* Core: when SMTP_HOST undef, echo the default value
* docker-compose: add port mapping
* docker-compose: drop network driver conf
* Exim macro: use localhost as LMTP host
* Update README.md
* docker-compose: Limit port mapping to loopback
* Update other docker-compose example files
This commit is contained in:
pini-gh
2021-03-15 18:47:13 +01:00
committed by GitHub
parent dcc130678f
commit c10aa6fce4
13 changed files with 75 additions and 65 deletions

View File

@@ -16,9 +16,11 @@ services:
- DATABASE_URL=postgres://mailman:mailmanpass@database/mailmandb
- DATABASE_TYPE=postgres
- DATABASE_CLASS=mailman.database.postgresql.PostgreSQLDatabase
ports:
- "127.0.0.1:8001:8001" # API
- "127.0.0.1:8024:8024" # LMTP - incoming emails
networks:
mailman:
ipv4_address: 172.19.199.2
mailman-web:
image: maxking/postorius:0.3
@@ -36,9 +38,11 @@ services:
- DATABASE_URL=postgres://mailman:mailmanpass@database/mailmandb
- SECRET_KEY=ksjdbaksdba
- UWSGI_STATIC_MAP=/static=/opt/mailman-web-data/static
ports:
- "127.0.0.1:8000:8000" # HTTP
- "127.0.0.1:8080:8080" # uwsgi
networks:
mailman:
ipv4_address: 172.19.199.3
database:
environment:
@@ -51,13 +55,6 @@ services:
- /opt/mailman/database:/var/lib/postgresql/data
networks:
mailman:
ipv4_address: 172.19.199.4
networks:
mailman:
driver: bridge
ipam:
driver: default
config:
-
subnet: 172.19.199.0/24