部署文档填充
parent
a5527ad5f0
commit
348fbefbe8
|
|
@ -0,0 +1,22 @@
|
||||||
|
# 版本号
|
||||||
|
version: '3.1'
|
||||||
|
# 配置
|
||||||
|
services:
|
||||||
|
mysql:
|
||||||
|
# 镜像名称
|
||||||
|
image: mysql:latest
|
||||||
|
#重启策略
|
||||||
|
restart: always
|
||||||
|
# 容器名称
|
||||||
|
container_name: mysql
|
||||||
|
# 容器时区
|
||||||
|
environment:
|
||||||
|
TZ: "Asia/Shanghai"
|
||||||
|
# 容器环境变量,数据库密码
|
||||||
|
MYSQL_ROOT_PASSWORD: "TcAweMyO5A4i"
|
||||||
|
# 容器端口映射
|
||||||
|
ports:
|
||||||
|
- '2009:3306'
|
||||||
|
# 容器卷挂载
|
||||||
|
volumes:
|
||||||
|
- "/disk/mysql:/var/lib/mysql"
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
spring.datasource.platform=mysql
|
spring.datasource.platform=mysql
|
||||||
db.num=1
|
db.num=1
|
||||||
db.url.0=jdbc:mysql://ruoyi-mysql:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
|
db.url.0=jdbc:mysql://47.116.194.158:2009/gan-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
|
||||||
db.user=root
|
db.user=root
|
||||||
db.password=password
|
db.password=TcAweMyO5A4i
|
||||||
|
|
||||||
nacos.naming.empty-service.auto-clean=true
|
nacos.naming.empty-service.auto-clean=true
|
||||||
nacos.naming.empty-service.clean.initial-delay-ms=50000
|
nacos.naming.empty-service.clean.initial-delay-ms=50000
|
||||||
|
|
@ -29,4 +29,4 @@ nacos.core.auth.enable.userAgentAuthWhite=false
|
||||||
nacos.core.auth.server.identity.key=serverIdentity
|
nacos.core.auth.server.identity.key=serverIdentity
|
||||||
nacos.core.auth.server.identity.value=security
|
nacos.core.auth.server.identity.value=security
|
||||||
|
|
||||||
nacos.istio.mcp.server.enabled=false
|
nacos.istio.mcp.server.enabled=false
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
#版本号
|
||||||
|
version : '3.1'
|
||||||
|
#服务配置
|
||||||
|
services:
|
||||||
|
#服务名称
|
||||||
|
gan-nacos:
|
||||||
|
#容器名称
|
||||||
|
container_name: nacos
|
||||||
|
#镜像名称
|
||||||
|
image: nacos/nacos-server
|
||||||
|
#环境变量 ,单机模式
|
||||||
|
environment:
|
||||||
|
- MODE=standalone
|
||||||
|
#挂载文件
|
||||||
|
volumes:
|
||||||
|
- ./logs/:/home/nacos/logs
|
||||||
|
- ./conf/application.properties:/home/nacos/conf/application.properties
|
||||||
|
#端口映射
|
||||||
|
ports:
|
||||||
|
- "8848:8848"
|
||||||
|
- "9848:9848"
|
||||||
|
- "9849:9849"
|
||||||
|
|
@ -4,4 +4,4 @@ FROM nacos/nacos-server
|
||||||
MAINTAINER wyh
|
MAINTAINER wyh
|
||||||
|
|
||||||
# 复制conf文件到路径
|
# 复制conf文件到路径
|
||||||
COPY ./conf/application.properties /home/nacos/conf/application.properties
|
COPY ./conf/application.properties /home/nacos/conf/application.properties
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
# 版本号
|
||||||
|
version: "3.1"
|
||||||
|
# 配置
|
||||||
|
services:
|
||||||
|
redis:
|
||||||
|
# 镜像名称
|
||||||
|
image: redis
|
||||||
|
# 容器名称
|
||||||
|
container_name: redis
|
||||||
|
# 容器时区
|
||||||
|
environment:
|
||||||
|
TZ: Asia/Shanghai
|
||||||
|
# 容器端口映射
|
||||||
|
ports:
|
||||||
|
- "2007:6379"
|
||||||
|
# 容器命令
|
||||||
|
command: ["redis-server","/etc/redis/redis.conf"]
|
||||||
|
# 容器重启策略
|
||||||
|
restart: always
|
||||||
|
# 容器卷挂载
|
||||||
|
volumes:
|
||||||
|
- /disk/soft/redis/conf:/etc/redis/
|
||||||
|
- /disk/soft/redis/data:/data
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
server{
|
||||||
|
listen 443 ssl http2;
|
||||||
|
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
|
||||||
|
server_name admin.gbgobig.com;
|
||||||
|
ssl_certificate /opt/web/gobigSSL/admin.gbgobig.com.pem;
|
||||||
|
ssl_certificate_key /opt/web/gobigSSL/admin.gbgobig.com.key;
|
||||||
|
listen 80;
|
||||||
|
if ($scheme = http) {
|
||||||
|
return 301 https://$host:443$request_uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /prod-api/{
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header REMOTE-HOST $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_pass http://localhost:8080/;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
alias /opt/web/admin/;
|
||||||
|
index index.html index.htm;
|
||||||
|
try_files $uri $uri/ /index.html last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
server {
|
||||||
|
listen 443 ssl http2;
|
||||||
|
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
|
||||||
|
server_name api.gbgobig.com;
|
||||||
|
ssl_certificate /opt/web/gobigSSL/api.gbgobig.com.pem;
|
||||||
|
ssl_certificate_key /opt/web/gobigSSL/api.gbgobig.com.key;
|
||||||
|
listen 80;
|
||||||
|
if ($scheme = http) {
|
||||||
|
return 301 https://$host:443$request_uri;
|
||||||
|
}
|
||||||
|
location /api {
|
||||||
|
rewrite ^/api(.*)$ $1 break;
|
||||||
|
proxy_pass http://47.116.194.158:9204;
|
||||||
|
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;
|
||||||
|
proxy_redirect http:// https://;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
proxy_buffering off;
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header X-Nginx-Proxy true;
|
||||||
|
proxy_hide_header X-Powered-By;
|
||||||
|
proxy_hide_header Vary;
|
||||||
|
client_max_body_size 2048m;
|
||||||
|
add_header X-Content-Type-Options nosniff;
|
||||||
|
proxy_next_upstream off;
|
||||||
|
proxy_read_timeout 600;
|
||||||
|
proxy_send_timeout 600;
|
||||||
|
proxy_connect_timeout 600;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue