Skip to content

Instantly share code, notes, and snippets.

@der3k
Last active November 16, 2016 08:40
Show Gist options
  • Save der3k/9fbab2337f3c83b64b55b941bce63800 to your computer and use it in GitHub Desktop.
Save der3k/9fbab2337f3c83b64b55b941bce63800 to your computer and use it in GitHub Desktop.

Digital Ocean Admin

Deploy

docker-compose

Let's encrytp certificate

  • install tool apt install letsencrypt
  • open firewall
    • install apt install ufw
ufw allow 80
ufw allow 443
ufw status
  • get the cert letsencrypt certonly
  • close firwall openings for 80 and 443 (both ip4 and ip6)
ufw status numbered
ufw delete $n
# repeat
openssl pkcs12 -export -in fullchain.pem -inkey privkey.pem -out keystore.p12 -name tomcat -CAfile chain.pem -caname root
  • configure java app to use kestore.p12
server:
  port: 443
  ssl:
    key-store: /etc/letsencrypt/live/<domain>/keystore.p12
    key-store-password: <your-password>
    keyStoreType: PKCS12
    keyAlias: tomcat
security:
  require-ssl: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment