How does this website is built & delploy?
05/07/2024
@ Saigon
Projects
1. Introduction
This website is built with Jekyll, build with Docker and deploy with Nginx on bare metal. At the deploy step, it’s all about copy file html files from docker to nginx’s www directory.
A process of auto-build & auto-deploy is done with Jenkins.
2. Jenkins
a. Build Trigger
I use GitHub hook trigger for GITScm polling.
In addition, on the github, I configure github’s webhook.
b. Pipeline
There is a trick here to copy to nginx’s www directory. user named jenkins
does copy file htmls into the nginx’s html directory.
As a consequence, prior to run pipeline,
- First, I create nginx’s html directory (
/usr/share/nginx/hexalink.xyz.html/
) - Then, I change user ownership to
jenkins
.
3. Nginx
a. Nginx config for hexalink.xyz / www.hexalink.xyz
b. Nginx config for jenkins
I follow this tutorial Reverse proxy - Nginx.