Coder Social home page Coder Social logo

cskenji / example-static-website-docker-nginx-certbot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from koddr/example-static-website-docker-nginx-certbot

0.0 1.0 0.0 56 KB

Example static website with Docker, Nginx and Certbot

Home Page: https://dev.to/koddr/how-to-dockerize-your-static-website-with-nginx-automatic-renew-ssl-for-domain-by-certbot-and-deploy-it-to-digitalocean-4cjc

License: MIT License

Makefile 8.98% Dockerfile 2.11% CSS 15.99% HTML 9.99% JavaScript 0.01% Shell 62.92%

example-static-website-docker-nginx-certbot's Introduction

Example static website with Docker, Nginx and Certbot

This is full project structure example of article How to dockerize your static website with Nginx, automatic renew SSL for domain by Certbot and deploy it to DigitalOcean?

Published on Dev.to @ 27 Jan 2020.

Requirements

  • Docker 19.x+

Usage

  • Clone this repository and go to folder:
git clone https://github.com/koddr/example-static-website-docker-nginx-certbot.git
cd example-static-website-docker-nginx-certbot
  • Change site.com to your domain at files:
./docker-compose.prod.yml
./webserver/nginx/default.conf
./webserver/nginx/site.com.conf
  • Push configured project to your own git repository.
  • Go to DigitalOcean account, create and configure new droplet (see screenshots in article).
  • Connect via SSH to your droplet and git clone your repo.
  • Check configuration of Certbot, start the process of obtaining SSL certificate in test mode:
make certbot-test DOMAINS="site.com www.site.com" [email protected]
  • If you see Congratulations!, all okay; start the process of obtaining SSL in production mode:
make certbot-prod DOMAINS="site.com www.site.com" [email protected]
  • And now, check Nginx config:
make deploy-test
  • No errors? Go your static website to production:
make deploy-prod
  • That's all!

Author

Article assistance

If you want to say «thank you»:

  1. Twit about article on your Twitter.
  2. Add a GitHub Star and make Fork to this repository.
  3. Donate some money to project author via PayPal: @paypal.me/koddr.
  4. Join DigitalOcean at our referral link (your profit is $100 and we get $25).

Thanks for your support! 😘

License

MIT

example-static-website-docker-nginx-certbot's People

Contributors

koddr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.