deploy:temp

This commit is contained in:
fanxb 2022-02-25 00:03:12 -09:00
parent 2e9d87896b
commit 51e8ce5d84
6 changed files with 68 additions and 9 deletions

4
.env
View File

@ -1,8 +1,8 @@
# 修改配置
MYSQL_ADDRESS=localhost:3306
MYSQL_ADDRESS=172.17.0.1:3306
MYSQL_USER=root
MYSQL_PASSWORD=123456
REDIS_HOST=localhost
REDIS_HOST=172.17.0.1
REDIS_PORT=6379
# 服务端口
NGINX_PORT=8080

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
data/maven/mavenRep
qiezi_front/yarn.lock

View File

@ -1,7 +1,7 @@
#!/bin/bash
# 配置统计key
process.env.VUE_APP_QIEZI_HOST = "https://fleyx.com";
process.env.VUE_APP_QIEZI_KEY = "aab3cad381f54ca5b7b9abeb2e09320a";
export VUE_APP_QIEZI_HOST = "https://fleyx.com";
export VUE_APP_QIEZI_KEY = "aab3cad381f54ca5b7b9abeb2e09320a";
base=$(cd "$(dirname "$0")";pwd)
# 前端打包

57
data/nginx/nginx.conf Normal file
View File

@ -0,0 +1,57 @@
user root;
worker_processes auto;
pid /run/nginx.pid;
events {
worker_connections 768;
}
http {
# Basic Settings
sendfile on;
# SSL Settings
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
# Logging Settings
access_log /dev/stdout;
error_log /dev/stderr;
# Gzip Settings
gzip on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png application/vnd.ms-fontobject font/ttf font/opentype font/x-woff image/svg+xml;
gzip_min_length 1K;
include /etc/nginx/mime.types;
default_type application/octet-stream;
ssl_prefer_server_ciphers on;
server {
listen 8080;
listen [::]:8080;
index index.html;
root /opt/dist/;
server_name _;
location / {
root /opt/dist/indexResource;
index index.html;
try_files $uri $uri/ /index.html;
}
location /qiezi/api {
proxy_pass http://backend:8088;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
client_max_body_size 100m;
}
location /manage{
root /opt/dist;
index index.html;
try_files $uri $uri/ /index.html;
}
}
}

View File

@ -3,7 +3,7 @@ services:
front:
image: nginx
networks:
- bookmark
- qiezi_statistic
volumes:
- /etc/localtime:/etc/localtime
- ./config/timezone:/etc/timezone
@ -15,7 +15,7 @@ services:
backend:
image: openjdk:11.0
networks:
- bookmark
- qiezi_statistic
volumes:
- /etc/localtime:/etc/localtime
- ./config/timezone:/etc/timezone
@ -30,9 +30,9 @@ services:
-Dmybatis-plus.configuration.log-impl=org.apache.ibatis.logging.nologging.NoLoggingImpl \
-Dspring.datasource.user='${MYSQL_USER}' \
-Dspring.datasource.password='${MYSQL_PASSWORD}' \
-Dspring.datasource.url=jdbc:mysql://${MYSQL_ADDRESS}/bookmark?useUnicode=true\&characterEncoding=utf-8\&useSSL=false\&useJDBCCompliantTimezoneShift=true\&useLegacyDatetimeCode=false\&serverTimezone=UTC \
-Dspring.datasource.url=jdbc:mysql://${MYSQL_ADDRESS}/qiezi?useUnicode=true\&characterEncoding=utf-8\&useSSL=false\&useJDBCCompliantTimezoneShift=true\&useLegacyDatetimeCode=false\&serverTimezone=UTC \
-Dspring.redis.host=${REDIS_HOST} \
-Dspring.redis.port=${REDIS_PORT} \
service.jar
networks:
bookmark:
qiezi_statistic:

View File

@ -17,6 +17,6 @@
<div id="app"></div>
<!-- built files will be auto injected -->
<script src="/indexResource/qieziStatistic_v1.min.js" type="text/javascript"></script>
<script src="/indexResource/qieziStatistic_v1.js" type="text/javascript"></script>
</body>
</html>