English | 中文文档
QQ Group
Group No.: 546574618
- System:
Centos/Debian/Ubuntu/macOS/Windows
- Hardware suggestion: 2 cores and above 4G memory
- Special note: Windows users please use
git bash
orcmder
to run the command
# 1、Clone the repository
# Clone projects on github
git clone --depth=1 git@github.com:hitosea/dootask-web.git
# 2、Enter directory
cd dootask-web
# 3、Copy environment variable file
cp .env.example .env
# 4、Install dependencies
npm install
# 5、Configure environment variables
VITE_APP_DEBUG=false # Close debug
VITE_APP_BASE_PATH="" # Base path, if there is no base path, please set it to empty, for example: /public
VITE_APP_URL="" # Api address
# 6、Production compilation
./cmd prod # or npm run build
- Copy the files in the public directory to the server web directory
# nginx configuration example
server {
listen 80;
server_name your_domain;
# gzip configuration
gzip on;
gzip_min_length 1k;
gzip_comp_level 6;
gzip_types text/plain text/css text/javascript application/json application/javascript application/x-javascript application/xml;
gzip_vary on;
gzip_disable "MSIE [1-6]\.";
# Vue project root directory
location / {
root /usr/share/nginx/html;
index index.html index.htm;
# Solve the problem of 404 when refreshing the Vue routing history mode
try_files $uri $uri/ /index.html;
}
# Static resource cache configuration
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
root /usr/share/nginx/html;
expires 7d;
access_log off;
}
# Error page configuration
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
NodeJs 20+
must be installed
# 1、Configure environment variables
VITE_APP_DEBUG=true # Open debug
VITE_APP_URL="" # Api address
# 2、Compile project
./cmd dev # or npm run start