├── README.md └── docker-compose.yml /README.md: -------------------------------------------------------------------------------- 1 | # simple-lets-encrypt-docker-compose-sample 2 | 3 | Sample `docker-compose.yml` that shows how to use [letsencrypt-nginx-proxy-companion](https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion). 4 | 5 | This `docker-compose.yml` starts up a wordpress instance backed by a db container. You **MUST** update the following variables: `VIRTUAL_HOST`, `LETSENCRYPT_HOST`, `LETSENCRYPT_EMAIL` in order for SSL to work. See [letsencrypt-nginx-proxy-companion](https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion) for more info. 6 | 7 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | 3 | services: 4 | 5 | wordpress: 6 | image: wordpress:4.7-apache 7 | environment: 8 | WORDPRESS_DB_PASSWORD: somepassword 9 | VIRTUAL_HOST: exampledomain.com 10 | LETSENCRYPT_HOST: exampledomain.com 11 | LETSENCRYPT_EMAIL: admin@exampledomain.com 12 | 13 | mysql: 14 | image: mariadb 15 | environment: 16 | MYSQL_ROOT_PASSWORD: somepassword 17 | 18 | nginx-proxy: 19 | image: jwilder/nginx-proxy 20 | ports: 21 | - "80:80" 22 | - "443:443" 23 | volumes: 24 | - "/etc/nginx/vhost.d" 25 | - "/usr/share/nginx/html" 26 | - "/var/run/docker.sock:/tmp/docker.sock:ro" 27 | - "/etc/nginx/certs" 28 | 29 | letsencrypt-nginx-proxy-companion: 30 | image: jrcs/letsencrypt-nginx-proxy-companion 31 | volumes: 32 | - "/var/run/docker.sock:/var/run/docker.sock:ro" 33 | volumes_from: 34 | - "nginx-proxy" --------------------------------------------------------------------------------