Fatih Sevük
Play With Codes

Play With Codes

Quick Notes

spring boot app ssl settings

  • Install cert boot

Cert Boot - Lets Encrypt

  • Convert the keys to PKCS12 using OpenSSL in the terminal as follows.
openssl pkcs12 -export -in fullchain.pem \ 
                 -inkey privkey.pem \ 
                 -out keystore.p12 
                 -name tomcat \
                 -CAfile chain.pem \
                 -caname root
  • Set application.properties

server.port: 8443
security.require-ssl=true
server.ssl.key-store:classpath:keystore.p12
server.ssl.key-store-password: <your-password>
server.ssl.keyStoreType: PKCS12
server.ssl.keyAlias: tomcat

spring boot app as a service

https://techdev.io/en/developer-blog/jvm-applications-as-a-service-with-systemd

https://patrickgrimard.io/2017/10/29/running-spring-boot-apps-with-systemd/


procfile


web: java -Dserver.port=$PORT -jar target/*.jar

jekyll to s3


git add .
git commit -m "new post added"
bash init.sh
git push origin master
JEKYLL_ENV=production jekyll build
aws s3 sync _site s3://<bucket-name>


-----------------------------------------------
Test Your Site In Local
-----------------------------------------------
jekyll serve

aws bucket policy for static web sites

{
    "Version": "2008-10-17",
    "Statement": [
        {
            "Sid": "PublicReadGetObject",
            "Effect": "Allow",
            "Principal": {
                "AWS": "*"
            },
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::<bucket-name>/*"
        }
    ]
}