udpate env and REAME

This commit is contained in:
Joseph Le 2023-10-12 15:16:57 +11:00
parent bbf11b6f2b
commit 682ad5d79d
2 changed files with 39 additions and 53 deletions

View File

@ -10,14 +10,14 @@
### 2) Access the folder you just cloned ### 2) Access the folder you just cloned
- root@root# root@root#
```sh ```sh
cd gitea_CICD cd gitea_CICD
``` ```
### 3) Check the directory path ### 3) Check the directory path
- root@root# root@root#
```sh ```sh
pwd pwd
``` ```
@ -25,39 +25,28 @@
### 4) Create folder service_run ### 4) Create folder service_run
- root@root# root@root#
`````sh ```sh
mkdir service_run mkdir service_run
``` ```
````sh ```sh
cp service/giteaService.conf service_run/giteaService.conf cp service/giteaService.conf service_run/giteaService.conf
``` ```
`````
### 5) Fill in environment variables (\*) ### 5) Fill in environment variables (\*)
- root@root# root@root#
```sh ```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 ### 6) Run file "install.sh" to install service
- root@root# root@root#
`sh ```sh
./install.sh ./install.sh
` ```
<div align="center"><img src="https://i.ibb.co/VJHhb3y/install-Service.png" alt="install server" width="600"></div> <div align="center"><img src="https://i.ibb.co/VJHhb3y/install-Service.png" alt="install server" width="600"></div>
#### ** Note: ** #### ** 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. - Depending on the technology your project uses, the "gitea_CICD/service/giteaHook.sh" file will be custom configured to match the technology.
<div align="center"><h4><i>**____ Joseph Le____ **</i></h4></div> <div align="center"><h4><i>**____ Joseph Le____ **</i></h4></div>
```
```

View File

@ -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 HOOK_PATH=/home/gitea_CICD
# Tai khoan git (*) # Git account (*)
GIT_USERNAME=joseph.le@apactech.io GIT_USERNAME=<your_username>
GIT_PASSWORD=Maypjtkh0ng GIT_PASSWORD=<your_password>
GIT_BRANCH=main GIT_BRANCH=<your_branch>
# Email (*) # Email: Used to send notifications when the repository has updates (*)
EMAIL_ADDRESS=joseph@apactech.io EMAIL_ADDRESS=<youremail>
# Send mail: True or False (*) # Enable/Disable send mail: True or False (*)
SEND_EMAIL=True SEND_EMAIL=True
# Duong dan goc cua project (*) # URL of project directory (*)
PROJECT_PATH=/home/Log_service # Example: /home/My_project/
PROJECT_PATH=</project/directory/path>
# Duong dan folder FE (*) # URL of front-end directory(*)
FE_PROJECT_PATH=/home/Log_service/manage-view # Example: /home/My_project/FE_directory
FE_PROJECT_PATH=</FE/directory/path>
# Duong dan folder public FE (*) # URL of front-end public directory (*)
FE_ROOT_FOLDER_PATH=/var/www/html # Example: /var/www/html
FE_ROOT_FOLDER_PATH=</FE/public/directory/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: <name>_PROCESS_PATH=</your/path> # Syntax:
# Cau lenh thuc thi: <name>_PROCESS_PATH_COMMAND=<command1> && <command2> ... # URL : <name>_PROCESS_PATH=</your/directory/path/>
# Execution command: <name>_PROCESS_PATH_COMMAND=<command1> && <command2> ...
# #
# Duong dan folder BE (*) # Example:
BE_PROCESS_PATH=/home/Log_service # URL of back-end directory(*)
BE_PROCESS_PATH_COMMAND=npm install && echo "\n" && echo "BACK_END" #BE_PROCESS_PATH=/home/My_project/BE_directory
#BE_PROCESS_PATH_COMMAND=npm install && echo "\n" && echo "BACK_END"
# Duong dan folder Socket (*) # URL of other directory(*)
SOCKET_PROCESS_PATH=/home/Log_service #OTHER_PROCESS_PATH=/home/My_project/Other_directory
SOCKET_PROCESS_PATH_COMMAND=npm install && echo "\n" && echo "SOCKET" #OTHER_PROCESS_PATH_PROCESS_PATH_COMMAND= command 1 && command 2
# Duong dan folder khac (*)
KHAC_PROCESS_PATH=/home/Log_service
KHAC_PROCESS_PATH_COMMAND=npm install && echo "\n" && echo "KHAC"