From 682ad5d79dc0ffb2067e20dad8120c0ba3c9370c Mon Sep 17 00:00:00 2001 From: Joseph Le Date: Thu, 12 Oct 2023 15:16:57 +1100 Subject: [PATCH] udpate env and REAME --- README.md | 35 +++++++----------------- service/giteaService.conf | 57 ++++++++++++++++++++------------------- 2 files changed, 39 insertions(+), 53 deletions(-) diff --git a/README.md b/README.md index f8ec072..2f5cceb 100644 --- a/README.md +++ b/README.md @@ -10,14 +10,14 @@ ### 2) Access the folder you just cloned -- root@root# +root@root# ```sh cd gitea_CICD ``` ### 3) Check the directory path -- root@root# +root@root# ```sh pwd ``` @@ -25,39 +25,28 @@ ### 4) Create folder service_run -- root@root# +root@root# - `````sh + ```sh mkdir service_run ``` - ````sh + ```sh cp service/giteaService.conf service_run/giteaService.conf ``` - ````` ### 5) Fill in environment variables (\*) -- root@root# +root@root# ```sh - nano service/giteaService + service_run/giteaService.conf ``` - - GIT_USERNAME: Username of the git account. - - GIT_PASSWORD: Password of the git account. - - GIT_BRANCH: The git branch is needed for the server. - - EMAIL_ADDRESS: Your email address. - - SEND_EMAIL: Turn on/off email sending feature. - - PROJECT_PATH: Root path of your project. - - FE_PROJECT_PATH: Path of the front-end folder. - - BE_PROJECT_PATH: Path of the back-end folder. - - FE_ROOT_FOLDER: Path of folder front-end public. - ### 6) Run file "install.sh" to install service -- root@root# -`sh +root@root# + ```sh ./install.sh - ` + ```
install server
#### ** Note: ** @@ -72,7 +61,3 @@ - Depending on the technology your project uses, the "gitea_CICD/service/giteaHook.sh" file will be custom configured to match the technology.

**____ Joseph Le____ **

- -``` - -``` diff --git a/service/giteaService.conf b/service/giteaService.conf index dac44aa..5c63ab6 100755 --- a/service/giteaService.conf +++ b/service/giteaService.conf @@ -1,42 +1,43 @@ -# Luu y: (*) La nhung bien moi truong can khai bao +# Warning: (*) are required variables to be declared -# Duong dan thu muc, index.js file de chay dich vu giteaHook (cac bien do he thong tu dong cap nhat) +# The variable is automatically filled in by the system HOOK_PATH=/home/gitea_CICD -# Tai khoan git (*) -GIT_USERNAME=joseph.le@apactech.io -GIT_PASSWORD=Maypjtkh0ng -GIT_BRANCH=main +# Git account (*) +GIT_USERNAME= +GIT_PASSWORD= +GIT_BRANCH= -# Email (*) -EMAIL_ADDRESS=joseph@apactech.io -# Send mail: True or False (*) +# Email: Used to send notifications when the repository has updates (*) +EMAIL_ADDRESS= +# Enable/Disable send mail: True or False (*) SEND_EMAIL=True -# Duong dan goc cua project (*) -PROJECT_PATH=/home/Log_service +# URL of project directory (*) +# Example: /home/My_project/ +PROJECT_PATH= -# Duong dan folder FE (*) -FE_PROJECT_PATH=/home/Log_service/manage-view +# URL of front-end directory(*) +# Example: /home/My_project/FE_directory +FE_PROJECT_PATH= -# Duong dan folder public FE (*) -FE_ROOT_FOLDER_PATH=/var/www/html +# URL of front-end public directory (*) +# Example: /var/www/html +FE_ROOT_FOLDER_PATH= # -# Cac duong dan khac can thuc thi khi pull. Co the them nhieu duong dan voi cu phap khai bao: +# It is possible to add many other directory besides the front-end directory # -# Duong dan: _PROCESS_PATH= -# Cau lenh thuc thi: _PROCESS_PATH_COMMAND= && ... +# Syntax: +# URL : _PROCESS_PATH= +# Execution command: _PROCESS_PATH_COMMAND= && ... # -# Duong dan folder BE (*) -BE_PROCESS_PATH=/home/Log_service -BE_PROCESS_PATH_COMMAND=npm install && echo "\n" && echo "BACK_END" +# Example: +# URL of back-end directory(*) +#BE_PROCESS_PATH=/home/My_project/BE_directory +#BE_PROCESS_PATH_COMMAND=npm install && echo "\n" && echo "BACK_END" -# Duong dan folder Socket (*) -SOCKET_PROCESS_PATH=/home/Log_service -SOCKET_PROCESS_PATH_COMMAND=npm install && echo "\n" && echo "SOCKET" - -# Duong dan folder khac (*) -KHAC_PROCESS_PATH=/home/Log_service -KHAC_PROCESS_PATH_COMMAND=npm install && echo "\n" && echo "KHAC" +# URL of other directory(*) +#OTHER_PROCESS_PATH=/home/My_project/Other_directory +#OTHER_PROCESS_PATH_PROCESS_PATH_COMMAND= command 1 && command 2