Compare commits

..

4 Commits

Author SHA1 Message Date
bunny 13ae12558c Merge pull request 'dev' (#2) from dev into master
Reviewed-on: #2
2024-05-12 00:37:14 +08:00
Bunny 15b1e92c92 chore: 🔨 eslint文件改为module 2024-05-11 23:28:06 +08:00
Bunny 119d219a8d chore: 🔨 添加docker文件 2024-05-11 23:20:55 +08:00
bunny 7ccf2b9732 Merge pull request 'ci: 🎡 修改控制台输出' (#1) from master into dev
Reviewed-on: #1
2024-05-11 23:10:35 +08:00
5 changed files with 57 additions and 2 deletions

View File

@ -1,6 +1,6 @@
// @see: http://eslint.cn
module.exports = {
export default {
root: true,
env: {
browser: true,

5
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,5 @@
{
"i18n-ally.localesPaths": [
"src/languages"
]
}

23
docker/dockerfile Normal file
View File

@ -0,0 +1,23 @@
# 使用官方的 Nginx 镜像作为基础镜像
FROM nginx
# 删除默认的 Nginx 配置文件
RUN rm /etc/nginx/conf.d/default.conf
# 将自定义的 Nginx 配置文件复制到容器中
COPY nginx.conf /etc/nginx/conf.d/
# 创建一个目录来存放前端项目文件
WORKDIR /usr/share/nginx/html
# 将前端项目打包文件复制到 Nginx 的默认静态文件目录
COPY dist/ /usr/share/nginx/html
# 复制到nginx目录下
COPY dist/ /etc/nginx/html
# 暴露 Nginx 的默认端口
EXPOSE 80
# 自动启动 Nginx
CMD ["nginx", "-g", "daemon off;"]

27
docker/nginx.conf Normal file
View File

@ -0,0 +1,27 @@
server {
listen 80;
listen [::]:80;
server_name localhost;
location / {
root /etc/nginx/html;
index index.html index.htm;
try_files $uri /index.html;
}
# 后端跨域请求
location ~/api/ {
proxy_pass http://192.168.3.98:1001;
}
# mock 跨域
location ~/mock/ {
proxy_pass http://192.168.3.98:1001;
}
error_page 404 404.html;
location = /50x.html {
root html;
}
}

View File

@ -1,6 +1,6 @@
import { defineConfig } from "@unocss/vite";
import presetUno from "@unocss/preset-uno";
import transformerDirectives from "@unocss/transformer-directives";
import { defineConfig } from "@unocss/vite";
export default defineConfig({
content: {