How to setup Jenkins using Docker

Install Jenkins using Dockersudo docker run –restart always -p 8081:8080 –name=jenkins -d \ -v /var/www/html:/var/www/html \ –env JAVA_OPTS=”-Xmx4092m” –env JENKINS_OPTS=”–prefix=/jenkins” jenkins/jenkins Get password from tail logs command.docker logs –tail 100 -f <container_name> Install Jenkins Recommend plugin. Install ZTI’s Recommend plugin.Manage Jenkins > Plugin Manager > Available Tab Gitlab Deploy to container Maven Integration Publish over […]

Teerakorn Bounoy

October 22, 2022

[Jasper] Setup Jasper Report with docker

First, you have to install docker into your server.Here is the configuration file. Setup Tomcat & MariaDB docker. Setup ZTI Tomcat docker.docker run –name zti_demo –restart always -v /usr/local/tomcat/webapps:/usr/local/tomcat/webapps -v /usr/local/tomcat/webapps/ROOT:/usr/local/tomcat/webapps/ROOT -v /usr/local/tomcat/logs:/usr/local/tomcat/logs -v /data:/data -p 8080:8080 -p 8443:8443 –env JAVA_OPTS=”-Djava.security.egd=file:/dev/./urandom” -d zealtech/tomcat:8.5.37 Setup MariaDB docker.docker run –name=zti_maria_demo –restart always -e MYSQL_ROOT_PASSWORD=’****’ -e MYSQL_DATABASE=zti -v […]

Teerakorn Bounoy

May 13, 2022

SSL: Nginx + Let’s encrypt on Windows

Download and install Nginx at: http://nginx.org/en/download.html Download win-acme at: https://github.com/win-acme/win-acme/releases/select: win-acme.v2.1.21.1218.x64.pluggable.zip unzip and open wacs.exe choose M [Create certificate(full options)] choose 2 [Manual input], then enter your domain ,[such as : win.ztidev.com] , then press enter next. choose 6 . verify domain with dns choose 2. RSA choose 2. nginx container . then enter your […]

Teerakorn Bounoy

March 7, 2022

Java F.A.Q

แก้ปัญหา Send mail error java.lang.RuntimeException: javax.mail.MessagingException: Could not convert socket to TLS;nested exception is:javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)at com.zti.dld.email.SendMailUtils.send(SendMailUtils.java:146) เพิ่ม propertiesprops.put(“mail.smtp.ssl.protocols”, “TLSv1.2”); Credit Big คนโสด

Teerakorn Bounoy

November 8, 2021

SpringBoot – Thymeleaf: Tips

Hot reload, add follow config in application.properties spring.thymeleaf.cache=false spring.thymeleaf.prefix=file:src/main/resources/templates/ spring.web.resources.static-locations=file:src/main/resources/static/ spring.thymeleaf.cache.period=0 ** ตอน deploy ขึ้น Server ต้อง comment 3 บรรทัดนี้ หรือไป config ใน Jenkins 2. Enable browser cache spring.web.resources.cache.cachecontrol.max-age=1d

Teerakorn Bounoy

October 29, 2021

Config project on ztidev.com & mapping domain

If you develop web app with HTML, Java or PHP languages and want to test on https://ztidev.com/<project_name>, or https://<domain_name>/ztidev.com, please follow this instruction. 1. Config Jenkins based on your project.Example in PHP: to move file after build to /var/www/html/<project_name>cp -rf <jenkins_project_name>/* /var/www/html/<project_name> 2. Remote to ZTI server.https://blog.zealtechinter.com/connect-to-linux-by-using-putty/ 3. Config path in NGINXvi /etc/nginx/conf.d/domain.confor vi /etc/nginx/conf.d/<domain_name>.conf […]

Teerakorn Bounoy

October 28, 2021
1 2