Pagoda panel one click deployment package
【 Software store => One key deployment => Import the project 】
One click deployment , After entering the domain name , Complete by default

GOFLY It's based on Golang+Vue Developed online customer service system . An online customer service system that can be privatized and deployed , The compiled binary files can be used directly without building a development environment , download zip Decompression can be , Rely only on MySQL database , It is a web page online customer service system out of the box , Committed to helping developers / Small and medium-sized webmasters quickly integrate private customer service functions .
Website online customer service system with source code demonstration and download address :www.sopans.com
Demo site :https://www.sopans.com
Manual pagoda panel installation
Install the pagoda panel in advance , The pagoda panel can easily configure the domain name 、 Reverse proxy 、 database , So it is recommended to install it . install nginx,mysql database (5.7 Or more )
Create database
Remember to set the database name , user name , password
Deploy application services
Upload the compressed package file to the server , For example, upload to /www/wwwroot/go-fly-pro, Assign permissions to all files in this directory 777
edit config/mysql.json, Modify the database name set when creating the database , user name , password
Get into shell Terminal execution command
Switch directories to /www/wwwroot/kefu.xxxx.com
cd /www/wwwroot/kefu.xxxx.com
Execute the import database command , Ensure that the database configuration information is correct , Automatically create and import database related tables
./kefu install
Execute the open service command , Listening port , Opening service ,-d For daemon mode
Make sure that all previous old processes have been shut down , Use ps Command to view the process , Not closed kill The old process . for example :ps aux|grep kefu
If the old process is not closed , Will it lead to access or run to the old process , The new service does not take effect . for example :killall kefu
./kefu server -d
Close the service , It can be used ps -ef|grep kefu Check whether the next process exists , Verify that the shutdown is successful
./sh stop.sh , Here, if the shutdown fails , It can be executed several times to ensure that all processes are closed
Go to the pagoda Security page to 8081 Port open
If it's a cloud server , Then the security group also needs to set the following settings 8081 The port can be accessed by the Internet .
At this point, you can access the Internet address : http://ip:8081/login
Configure the domain name
Go to the pagoda website page => Add site
Set up reverse proxy , Reverse to the default that the customer service program listens 8081 port
Edit the reverse proxy configuration file
Complete configuration file ( Pay attention to the port number , Nothing else should be changed )
#PROXY-START/ location / { try_files $uri @kefu; } location @kefu { proxy_pass http://127.0.0.1:8081; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header REMOTE-HOST $remote_addr; add_header X-Cache $upstream_cache_status; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; #Set Nginx Cache add_header Cache-Control no-cache; } #PROXY-END/
To configure HTTPS
You need to pause the reverse proxy first , To open
Free of charge SSL certificate
Source code compilation
Unzip the source zip directory , There's a install_go.sh Of shell Script , This is the installation I wrote golang Scripts for the environment .
Direct execution sh install_go.sh
Check golang Environment installed successfully , perform go version
Compile executable , perform go build -o kefu , This will generate a file named in the current directory kefu The binary executable of . The remaining steps are the same as above .
Distributed solutions
In order to reduce dependency, the current project does not support distributed , But there can be other implementations
Because it is convenient to deploy without dependencies , So it can be distributed by domain name , such as kf1.sopans.com kf2.sopans.com , Deploy to different machines , All use one MySQL database . When the front end jumps to customer service , Through visitors ID Proceed to the next allocation policy
By geographical distribution , such as cn.sopans.com Deploy to domestic machines , hk.sopans.com Deployed in Hong Kong ,na.sopans.com Deploy to North America , Front end allocation according to the visitor concentration area .
thank