Skip to content

Commit

Permalink
Merge branch 'master' of github.com:madneal/gshark
Browse files Browse the repository at this point in the history
  • Loading branch information
madneal committed Nov 26, 2023
2 parents 8345799 + dea01e3 commit 42b01cf
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 9 deletions.
46 changes: 38 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,51 @@ For the usage of GShark, please refer to [wiki](https://github.com/madneal/gshar
* Nginx
* MySQL(version above **8.0**)

It's suggested to deploy the frontend project by nginx. Place the `dist` folder under `/var/www/html`, modify the `nginx.conf` to reverse proxy the backend service. For the detailed deployment videos, refer to [bilibili](https://www.bilibili.com/video/BV1Py4y1s7ap/) or [youtube](https://youtu.be/bFrKm5t4M54). For the deployment in windows, refer to [here](https://www.bilibili.com/video/BV1CA411L7ux/).
It's suggested to deploy the frontend project by nginx. Place the `dist` folder under `/var/www/html`, modify the `nginx.conf` (/etc/nginx/nginx.conf for linux) to reverse proxy the backend service. For the detailed deployment videos, refer to [bilibili](https://www.bilibili.com/video/BV1Py4y1s7ap/) or [youtube](https://youtu.be/bFrKm5t4M54). For the deployment in windows, refer to [here](https://www.bilibili.com/video/BV1CA411L7ux/).

### Nginx

Modify the `nginx.conf`:

```
location /api/ {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
rewrite ^/api/(.*)$ /$1 break;
proxy_pass http://127.0.0.1:8888;
// config the user accoring to your need
user www www;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 8080;
server_name localhost;
location / {
autoindex on;
root html;
index index.html index.htm;
}
location /api/ {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
rewrite ^/api/(.*)$ /$1 break;
proxy_pass http://127.0.0.1:8888;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
include servers/*;
}
```

The deployment work is straightforward. Find the corresponding version zip file from [releases](https://github.com/madneal/gshark/releases).
Expand Down
4 changes: 3 additions & 1 deletion sql.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## v1.2.0
```
create table gshark.task
(
id bigint unsigned auto_increment
Expand All @@ -17,10 +18,11 @@ create index idx_task_deleted_at
on gshark.task (deleted_at);
insert into sys_base_menus (created_at, updated_at, deleted_at, menu_level, parent_id, path, name, hidden, component, sort, keep_alive, default_menu, title, icon, close_tab)
values (current_timestamp, current_timestamp, null, 0, 24, 'task', 'task', 0, 'view/token/task.vue', 4, 0, 0, '任务管理', 's-flag', 0);
values (current_timestamp, current_timestamp, null, 0, 24, 'task', 'task', 0, 'view/task/task.vue', 4, 0, 0, '任务管理', 's-flag', 0);
insert into casbin_rule (p_type, v0, v1, v2) values ('p', 888, '/task/getTaskList', 'GET');
insert into casbin_rule (p_type, v0, v1, v2) values ('p', 888, '/task/createTask', 'POST');
insert into casbin_rule (p_type, v0, v1, v2) values ('p', 888, '/task/switchTaskStatus', 'POST');
```

## v1.1.0

Expand Down

0 comments on commit 42b01cf

Please sign in to comment.