From f9ac240d32ca6db5415ced4e4334688d7f255175 Mon Sep 17 00:00:00 2001 From: Bruno Zell Date: Thu, 20 Sep 2018 23:29:03 +0200 Subject: [PATCH 1/2] moved all source files to src folder --- Dockerfile => src/Dockerfile | 0 Makefile => src/Makefile | 0 {nginx_conf.d => src/nginx_conf.d}/certbot.conf | 0 {scripts => src/scripts}/entrypoint.sh | 0 {scripts => src/scripts}/run_certbot.sh | 0 {scripts => src/scripts}/util.sh | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename Dockerfile => src/Dockerfile (100%) rename Makefile => src/Makefile (100%) rename {nginx_conf.d => src/nginx_conf.d}/certbot.conf (100%) rename {scripts => src/scripts}/entrypoint.sh (100%) rename {scripts => src/scripts}/run_certbot.sh (100%) mode change 100755 => 100644 rename {scripts => src/scripts}/util.sh (100%) diff --git a/Dockerfile b/src/Dockerfile similarity index 100% rename from Dockerfile rename to src/Dockerfile diff --git a/Makefile b/src/Makefile similarity index 100% rename from Makefile rename to src/Makefile diff --git a/nginx_conf.d/certbot.conf b/src/nginx_conf.d/certbot.conf similarity index 100% rename from nginx_conf.d/certbot.conf rename to src/nginx_conf.d/certbot.conf diff --git a/scripts/entrypoint.sh b/src/scripts/entrypoint.sh similarity index 100% rename from scripts/entrypoint.sh rename to src/scripts/entrypoint.sh diff --git a/scripts/run_certbot.sh b/src/scripts/run_certbot.sh old mode 100755 new mode 100644 similarity index 100% rename from scripts/run_certbot.sh rename to src/scripts/run_certbot.sh diff --git a/scripts/util.sh b/src/scripts/util.sh similarity index 100% rename from scripts/util.sh rename to src/scripts/util.sh From 80b1ba3d4d963611af0d4132f431ee0a8b229703 Mon Sep 17 00:00:00 2001 From: Bruno Zell Date: Thu, 20 Sep 2018 23:34:20 +0200 Subject: [PATCH 2/2] added baisc usage example --- example/Dockerfile | 2 ++ example/docker-compose.yml | 11 +++++++++++ example/nginx.conf | 9 +++++++++ 3 files changed, 22 insertions(+) create mode 100644 example/Dockerfile create mode 100644 example/docker-compose.yml create mode 100644 example/nginx.conf diff --git a/example/Dockerfile b/example/Dockerfile new file mode 100644 index 0000000..21c5edd --- /dev/null +++ b/example/Dockerfile @@ -0,0 +1,2 @@ +FROM staticfloat/nginx-certbot +COPY *.conf /etc/nginx/conf.d/ \ No newline at end of file diff --git a/example/docker-compose.yml b/example/docker-compose.yml new file mode 100644 index 0000000..8e4bad8 --- /dev/null +++ b/example/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3' + +services: + proxy: + build: . + restart: always + environment: + CERTBOT_EMAIL: "your.email@example.com" + ports: + - "80:80" + - "443:443" diff --git a/example/nginx.conf b/example/nginx.conf new file mode 100644 index 0000000..8d1769e --- /dev/null +++ b/example/nginx.conf @@ -0,0 +1,9 @@ +server { + listen 443 ssl; + server_name yourhostname.com; + ssl_certificate /etc/letsencrypt/live/yourhostname.com/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/yourhostname.com/privkey.pem; + + return 200 'Let\'s Encrypt certificate successfully installed!'; + add_header Content-Type text/plain; +}