Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ services:
- DATABASE_TYPE=postgres
- DATABASE_CLASS=mailman.database.postgresql.PostgreSQLDatabase
- HYPERKITTY_API_KEY=someapikey
- SMTP_HOST=localhost
- SMTP_PORT=25
- SMTP_HOST_USER=postfix

ports:
- "127.0.0.1:8001:8001" # API
- "127.0.0.1:8024:8024" # LMTP - incoming emails
Expand All @@ -42,6 +46,10 @@ services:
- DATABASE_TYPE=postgres
- DATABASE_URL=postgresql://mailman:mailmanpass@database/mailmandb
- HYPERKITTY_API_KEY=someapikey
- SERVE_FROM_DOMAIN=devmailman.hks.harvard.edu
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want your domain and email addresses included as part of the defaults? Wouldn't it be better to use example.com and user@example.com, or something similar?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, @labrown i thought i cancelled this, made a mistake, meant to PR on a fork i have of this project.

- MAILMAN_ADMIN_USER=pthornton
- MAILMAN_ADMIN_EMAIL=peter_thornton@hks.harvard.edu
- SECRET_KEY=somesecretkey
ports:
- "127.0.0.1:8000:8000" # HTTP
- "127.0.0.1:8080:8080" # uwsgi
Expand All @@ -63,7 +71,21 @@ services:
retries: 5
networks:
mailman:

nginx:
image: nginx:latest
container_name: nginx
ports:
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
- /path/to/ssl/certs:/etc/ssl/certs:ro
environment:
- SSL_CERT_PATH=/etc/ssl/certs/devmailman_hks_harvard_edu.pem
- SSL_CERT_KEY_PATH=/etc/ssl/certs/devmailman-hks-harvard.edu.key
depends_on:
- mailman-web
networks:
- mailman
networks:
mailman:
driver: bridge
Expand Down
20 changes: 20 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
server {

listen 443 ssl default_server;
listen [::]:443 ssl default_server;

server_name devmailman.hks.harvard.edu;
location /static/ {
alias /opt/mailman/web/static/;
}

location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;

}
ssl_certificate /etc/ssl/certs/devmailman_hks_harvard_edu.pem;
ssl_certificate_key /etc/ssl/certs/devmailman-hks-harvard.edu.key;

}