Skip to content

Instantly share code, notes, and snippets.

@aguerrave
Forked from analogic/docker-compose.yml
Created September 2, 2019 00:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aguerrave/ada63214a6a984b9e0a3d56f0b94f0b8 to your computer and use it in GitHub Desktop.
Save aguerrave/ada63214a6a984b9e0a3d56f0b94f0b8 to your computer and use it in GitHub Desktop.
Poste.io (with Lets Encrypt) + Nginx reverse proxy + Nginx Lets encrypt companion
version: '3'
services:
nginx-proxy:
image: jwilder/nginx-proxy
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
container_name: nginx-proxy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- /data/nginx/conf.d:/etc/nginx/conf.d
- /data/nginx/vhost.d:/etc/nginx/vhost.d
- /data/nginx/html:/usr/share/nginx/html
- /data/nginx/certs:/etc/nginx/certs:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
nginx-letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: nginx-letsencrypt
restart: unless-stopped
volumes:
- /data/nginx/conf.d:/etc/nginx/conf.d
- /data/nginx/vhost.d:/etc/nginx/vhost.d
- /data/nginx/html:/usr/share/nginx/html
- /data/nginx/certs:/etc/nginx/certs:rw
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- NGINX_DOCKER_GEN_CONTAINER=nginx
- NGINX_PROXY_CONTAINER=nginx
mailserver:
image: poste.io/mailserver:dev
container_name: mailserver
restart: unless-stopped
ports:
- "25:25"
- "110:110"
- "143:143"
- "587:587"
- "993:993"
- "995:995"
- "4190:4190"
environment:
- LETSENCRYPT_EMAIL=info@analogic.cz
- LETSENCRYPT_HOST=mail.poste.io
- VIRTUAL_HOST=mail.poste.io
- HTTPS=OFF
volumes:
- /etc/localtime:/etc/localtime:ro
- /data/nginx/html/.well-known:/opt/www/.well-known
- /data/mailserver:/data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment