Add usage example to `README.md`

This commit is contained in:
Elliot Saba 2018-05-02 14:34:23 -07:00 committed by GitHub
parent b8b50ae5da
commit 87258f91e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 37 additions and 0 deletions

View File

@ -9,6 +9,43 @@ Certbot github: https://github.com/certbot/certbot
This repository was originally forked from `@henridwyer`, many thanks to him for the good idea. I've rewritten about 90% of this repository, so it bears almost no resemblance to the original. This repository is _much_ more opinionated about the structure of your webservers/containers, however it is easier to use as long as all of your webservers follow that pattern.
# Usage
Use this image with a `Dockerfile` such as:
```Dockerfile
FROM staticfloat/nginx-certbot
COPY *.conf /etc/nginx/conf.d/
```
And a `.conf` file such as:
```nginx
server {
listen 443 ssl;
server_name server.company.com;
ssl_certificate /etc/letsencrypt/live/server.company.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/server.company.com/privkey.pem;
location / {
...
}
}
```
Wrap this all up with a `docker-compose.yml` file:
```yml
version: '3'
services:
frontend:
restart: unless-stopped
build: frontend
ports:
- 80:80/tcp
- 443:443/tcp
environment:
- CERTBOT_EMAIL=owner@company.com
...
```
# Changelog
### 0.8