Coder Social home page Coder Social logo

twin / digitalocean-spring-droplet-template Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 18 KB

A template that configures a droplet from scratch with HTTPS and the latest openjdk

Shell 100.00%
digitalocean spring spring-boot ubuntu droplet template bash letsencrypt

digitalocean-spring-droplet-template's Introduction

digitalocean-spring-droplet-template

As the name more or less implies, this repository is a template of the necessary dependencies required to run a spring boot application on a fresh droplet.

Rather than having your Spring application take care of the certificates, this uses Nginx as reverse proxy to perform SSL termination. If the user tries to use HTTP rather than HTTPS, Nginx will redirect the user to HTTPS.

scheme

* NOTE: HTTP (80) gets redirected to HTTPS (443)

For now, the initial configuration is expected to be one of the following:

  • Ubuntu 18.04 x64
  • Ubuntu 16.04 x64

Later on, perhaps support for different distributions will be added.

What does it do?

  • Installs the latest JDK
  • Generates a TLS certificate with LetsEncrypt using certbot
  • Installs Nginx to use as reverse proxy for SSL/TLS termination

Nginx will listen to port 80 and port 443.

  • If the port is 80, then the user will be redirected to port 443.
  • If the port is 443, then the user will see where Nginx' reverse proxy is pointing to, which is the port your application is bound to.

How does it work?

Assuming you already ssh'd in the droplet using the root user

git clone https://github.com/TwinProduction/digitalocean-spring-droplet-template
cd digitalocean-spring-droplet-template
chmod 755 install.sh
./install.sh yourdomain.com 8080

where 8080 is the port on which your application runs on (cannot be 443 or 80).

Requirements

  • Create a new Ubuntu 18.04 x64 droplet
  • Have a domain pointing to DigitalOcean's name servers
  • Have that domain pointing to your new droplet using an A record

digitalocean-spring-droplet-template's People

Contributors

twin avatar

Watchers

 avatar  avatar

digitalocean-spring-droplet-template's Issues

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.