init
This commit is contained in:
6
doc/script/docker/app/README.md
Normal file
6
doc/script/docker/app/README.md
Normal file
@@ -0,0 +1,6 @@
|
||||
## 一键部署流程
|
||||
1. 将开发完毕的数据库脚本放入`database`目录下,重命名为`init.sql`, 提前修改好`admin`的密码。
|
||||
2. 将`.env`文件内所需的内容填充完整,注意`publicKey`需要与前端配置保持一致。
|
||||
3. 将前端工程配置好`publicKey`后打包,将打包后的文件放入`nginx/html`目录下。
|
||||
4. 生产环境需采用`prod`模式启动,将会强制校验弱密码,未修改`admin`密码将会无法登陆。
|
||||
5. 执行`docker compose up -d`命令启动容器即可。
|
||||
3635
doc/script/docker/app/database/init.sql
Normal file
3635
doc/script/docker/app/database/init.sql
Normal file
File diff suppressed because one or more lines are too long
46
doc/script/docker/app/nginx/html/index.html
Normal file
46
doc/script/docker/app/nginx/html/index.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
|
||||
<head>
|
||||
<meta charset='UTF-8' />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
|
||||
<meta http-equiv='X-UA-Compatible' content='chrome=1' />
|
||||
<meta name='renderer' content='webkit'>
|
||||
<meta name='viewport' content='width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0'>
|
||||
<meta name='apple-mobile-web-app-capable' content='yes'>
|
||||
<meta name='apple-mobile-web-app-status-bar-style' content='black'>
|
||||
<meta name='format-detection' content='telephone=no'>
|
||||
<link rel='icon' href='/favicon.png' />
|
||||
<link rel='stylesheet' href='/iconfont/index.css'>
|
||||
<link rel='stylesheet' href='/iconfont/avue/iconfont.css'>
|
||||
<link rel='stylesheet' href='/iconfont/saber/iconfont.css'>
|
||||
<link rel='stylesheet' href='/iconfont/common/iconfont.css'>
|
||||
<link rel='stylesheet' href='/css/loading.css'>
|
||||
<link rel='stylesheet' href='/css/saber.css'>
|
||||
<title>BladeX微服务开发平台</title>
|
||||
<script type="module" crossorigin src="/assets/index-DpW_RhWM.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/assets/element-plus-BIeOjcXi.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/@smallwei/avue-vR-k9VHw.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-BsjWj5lr.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id='app'>
|
||||
<div id='loader-wrapper'>
|
||||
<div class='loader-box'>
|
||||
<span>BladeX</span>
|
||||
<span>微</span>
|
||||
<span>服</span>
|
||||
<span>务</span>
|
||||
<span>开</span>
|
||||
<span>发</span>
|
||||
<span>平</span>
|
||||
<span>台</span>
|
||||
</div>
|
||||
<div class='loader-title'>系统加载中</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
77
doc/script/docker/app/nginx/nginx.conf
Normal file
77
doc/script/docker/app/nginx/nginx.conf
Normal file
@@ -0,0 +1,77 @@
|
||||
|
||||
user root;
|
||||
worker_processes 1;
|
||||
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
keepalive_timeout 65;
|
||||
|
||||
#gzip on;
|
||||
|
||||
#include /etc/nginx/conf.d/*.conf;
|
||||
|
||||
upstream gateway {
|
||||
server blade-api;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 2888;
|
||||
server_name web;
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
gzip on;
|
||||
gzip_min_length 1k;
|
||||
gzip_buffers 4 16k;
|
||||
gzip_http_version 1.1;
|
||||
gzip_comp_level 2;
|
||||
gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml;
|
||||
gzip_vary on;
|
||||
gzip_proxied expired no-cache no-store private auth;
|
||||
gzip_disable "MSIE [1-6]\.";
|
||||
|
||||
location /{
|
||||
index index.html;
|
||||
error_page 404 /index.html;
|
||||
}
|
||||
|
||||
location ~ ^/(api/)?actuator {
|
||||
return 403;
|
||||
}
|
||||
|
||||
location ^~ /oauth/redirect {
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
|
||||
location ^~ /api/ {
|
||||
proxy_redirect off;
|
||||
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_buffering off;
|
||||
rewrite ^/api/(.*)$ /$1 break;
|
||||
proxy_pass http://gateway/;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user