This commit is contained in:
aaron 2025-03-09 11:10:56 +08:00
parent e444715299
commit 0f7e55b139
3 changed files with 8 additions and 6 deletions

View File

@ -29,8 +29,9 @@ WORKDIR /app
# 复制 package.json 和 yarn.lock # 复制 package.json 和 yarn.lock
COPY package.json yarn.lock* ./ COPY package.json yarn.lock* ./
# 安装依赖 # 安装依赖,确保 dotenv 被正确安装
RUN yarn install --frozen-lockfile RUN yarn install --frozen-lockfile && \
yarn add dotenv@16.3.1 --exact
# 复制项目文件 # 复制项目文件
COPY . . COPY . .
@ -72,7 +73,8 @@ COPY --from=build-stage /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf COPY nginx.conf /etc/nginx/conf.d/default.conf
# 添加构建信息文件,用于验证部署 # 添加构建信息文件,用于验证部署
RUN echo "Build completed at: $(date)" > /usr/share/nginx/html/build-info.txt RUN echo "Build completed at: $(date)" > /usr/share/nginx/html/build-info.txt && \
echo "Environment: ${NODE_ENV}" >> /usr/share/nginx/html/build-info.txt
# 暴露80端口 # 暴露80端口
EXPOSE 80 EXPOSE 80

View File

@ -21,6 +21,7 @@
"dependencies": { "dependencies": {
"ant-design-vue": "^3.0.0", "ant-design-vue": "^3.0.0",
"axios": "^1.8.2", "axios": "^1.8.2",
"dotenv": "^16.3.1",
"vue": "^3.0.0", "vue": "^3.0.0",
"vue-router": "^4.0.0", "vue-router": "^4.0.0",
"vuex": "^4.0.0" "vuex": "^4.0.0"
@ -31,7 +32,6 @@
"@vue/compiler-sfc": "^3.0.0", "@vue/compiler-sfc": "^3.0.0",
"babel-loader": "^10.0.0", "babel-loader": "^10.0.0",
"css-loader": "^7.1.2", "css-loader": "^7.1.2",
"dotenv": "^16.3.1",
"html-webpack-plugin": "^5.0.0", "html-webpack-plugin": "^5.0.0",
"style-loader": "^4.0.0", "style-loader": "^4.0.0",
"vue-loader": "^17.0.0", "vue-loader": "^17.0.0",

View File

@ -58,9 +58,9 @@
</a-layout-content> </a-layout-content>
<!-- 底部 --> <!-- 底部 -->
<a-layout-footer class="layout-footer"> <!-- <a-layout-footer class="layout-footer">
蜂快 · 运营商平台 ©2025 蜂快 · 运营商平台 ©2025
</a-layout-footer> </a-layout-footer> -->
</a-layout> </a-layout>
</a-layout> </a-layout>
</template> </template>