On Sep 19, 2020, at 3:02 PM, Abhilash Raj <maxking@asynchronous.in> wrote:
Are you using the provided docker-compose file or are you using something else like Kubernetes to deploy the container images?
I am using the provided docker-compose file.
It seems like your mailman-core container isn't able to talk to Postorius on the default dns name, mailman-web, in the provided docker-compose file. These dns names are setup by default if you are using the docker-compose.yaml provided with the repo, but would otherwise needs either changing the value of POSTORIUS_TEMPLATES_BASE_URL or manually setting up the mailman-web DNS in the
/etc/host
of the mailman-core container.
Telnet isn’t included in the container, so I tested with curl:
$ sudo docker exec -it -u mailman mailman-core bash bash-5.0$ grep mailman-web /etc/hosts bash-5.0$ curl http://mailman-web:8000 bash-5.0$
mailman-web does not seem to be in /etc/hosts of mailman-core, but it does resolve and port 8000 is reachable. (I tested with a bad hostname and a different port and did get error messages.) Is there a URL I can pull that will show that it’s working properly?
My original (slightly censored) docker-compose.yaml file is below.
Thanks, Seth
version: '2'
services: mailman-core: image: maxking/mailman-core:latest container_name: mailman-core hostname: mailman-core restart: always volumes: - /opt/mailman/core:/opt/mailman/ #stop_grace_period: 30s links: - database:database depends_on: - database environment: - DATABASE_URL=postgres://xxx:xxx@database/mailmandb - DATABASE_TYPE=postgres - DATABASE_CLASS=mailman.database.postgresql.PostgreSQLDatabase - HYPERKITTY_API_KEY=xxxxxx networks: mailman: ipv4_address: 172.19.199.2
mailman-web: image: maxking/mailman-web:latest container_name: mailman-web hostname: mailman-web restart: always depends_on: - database links: - mailman-core:mailman-core - database:database volumes: - /opt/mailman/web:/opt/mailman-web-data environment: - DATABASE_TYPE=postgres - DATABASE_URL=postgres://xxx:xxx@database/mailmandb - HYPERKITTY_API_KEY=xxxx - SERVE_FROM_DOMAIN=lists.example.com - DJANGO_ALLOWED_HOSTS=lists.example2.com - MAILMAN_ADMIN_USER=xxx - MAILMAN_ADMIN_EMAIL=xxx@xxxx - SECRET_KEY=xxxxxx networks: mailman: ipv4_address: 172.19.199.3
database: environment: POSTGRES_DB: mailmandb POSTGRES_USER: xxx POSTGRES_PASSWORD: xxx restart: always image: postgres:9.6-alpine volumes: - /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