diff --git a/.env b/.env index 9988449..c77f4b0 100644 --- a/.env +++ b/.env @@ -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 \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aa94ce4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +data/maven/mavenRep +qiezi_front/yarn.lock diff --git a/build.sh b/build.sh index 863499f..40eadb1 100644 --- a/build.sh +++ b/build.sh @@ -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) # 前端打包 diff --git a/data/nginx/nginx.conf b/data/nginx/nginx.conf new file mode 100644 index 0000000..0c1ad40 --- /dev/null +++ b/data/nginx/nginx.conf @@ -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; + } + + + + + } +} diff --git a/docker-compose.yml b/docker-compose.yml index 0a4c319..855c32a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: diff --git a/qiezi_front/public/index.html b/qiezi_front/public/index.html index 9777199..f3a1a9f 100644 --- a/qiezi_front/public/index.html +++ b/qiezi_front/public/index.html @@ -17,6 +17,6 @@
- +