- version 1.6+ needed
- install https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-14-04
- start
- clone the source to
/var/address-boss
- cd
/var/address-boss
docker-compose pull
docker-compose up -d
- clone the source to
- check status
docker-compose ps
- check logs
docker-compose logs
- stop
docker-compose down
- install tool
apt install letsencrypt
- open firewall
- install
apt install ufw
- install
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
- change folder to live cert (
/ets/letsencrypt/live/...
) and generate java keystore https://dzone.com/articles/spring-boot-secured-by-lets-encrypt
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