ประสบปัญหา มี web app ตัวหนึ่งที่ต้องการ เข้าคุยด้วย https แต่เรา ดันมีเว็บที่รองรับได้แค่ http ทีนี้เราจะทำอย่างไรดีหละ ?
มี web application ที่เข้าด้วย http ชื่อ Kafdrop จะเป็นตัวทดลองใน lab ครั้งนี้

ปกติ จะเข้าด้วย http://192.168.88.208:9000 เราต้องการให้เข้าผ่าน https port 443 https://192.168.88.208
ได้เรื่องละ เริ่มต้นค้นหาด้วยคำว่า http to https แล่วก็พอว่า nginx ก็ทำได้นินา สังสัยเราต้องทำลองเปิด lab ซะแล้ว

มาทำ unit test Angular cli บน Docker กันเถอะ
สืบเนื่องมาจากติดปัญหา ได้มีโอกาสได้นำ angular ไป deploy และต้องใช้ Jenkins ประเด็นคือ มี stage นึง ที่เป็น unit-test เรื่องจึงเกิดขึ้น (งานเข้าละ !!)
จากที่ได้ลองทำมา ขอจดบันทึกไว้หน่อย กันลืมก็แล้วกัน unittest ของ angular โดยปกติ เราจะใช้ Karma , Jasmine และอื่นๆ ทำงานร่วมกันบน browser อย่างที่ชาว developer รู้จักกันดี มันเป็น framework front-end
หลักการง่ายๆพางง ก็คือ พอจะไปบน automate deploy ด้วย CI/CD จึงต้องทำให้อยู่รูปแบบ Chrome-headless ซึ่งโดยปกติ ใครทีไหนจะมี browser ให้เปิดบนนั้นกันเล่า
1. สร้าง Project angular cli สำหรับใคร ไม่รู้ทำไง อย่างลอง ตามนี้ https://cli.angular.io/

2. ได้ project ใหม่แล้วมาสร้าง Custom file Dockerfileใหม่กัน (ไว้ root path นะ)
อธิบายเพิ่มเติม : ได้มีการนำ base image ของ nodejs มา custom ต่อ จากนัั้น install package ที่จำเป็นต้องใช้ลงไป (xvfb, dbus ) https://www.x.org/releases/X11R7.6/doc/man/man1/Xvfb.1.xhtml
จากนั้นติดตั้งในส่วน browser chrome…
I want capture log from standard out using FluentD but i will found format log isn’t work !
เปลี่ยน log springboot ให้ออกเป็น JSON อย่างง่าย
I want use JSON Format from spring boot app so , “Easy Solution” i will show you how to Convert STOUT Log format Json
basically application log out format

TO

Hey, I am Bokie Tarathep. A full stack software developer. I love researching new technology science anime game and another world. tarathep.com