[ADD]쿠버네티스 배포 파일 추가

main
jschoi 11 months ago
parent 1fbc062687
commit b88b363549

@ -0,0 +1,2 @@
NODE_ENV = "prod"
VITE_ROOT_PATH = "/autoflow"

@ -0,0 +1,30 @@
module.exports = {
root: true,
env: {
node: true,
},
extends: [
"eslint:recommended",
"plugin:@vue/typescript/recommended",
"plugin:vue/vue3-recommended",
"plugin:prettier/recommended",
],
parserOptions: {
parser: "@typescript-eslint/parser",
},
rules: {
"vue/multi-word-component-names": "off",
"vue/comment-directive": "off",
"vue/no-v-html": "off",
"no-console": process.env.NODE_ENV === "prod" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "prod" ? "warn" : "off",
"vue/no-deprecated-slot-attribute": "off",
"@typescript-eslint/no-explicit-any": "off",
"prettier/prettier": [
"error",
{
endOfLine: "auto",
},
],
},
};

@ -0,0 +1,9 @@
FROM nginx:stable-alpine
RUN apk --no-cache add tzdata && cp /usr/share/zoneinfo/Asia/Seoul /etc/localtime
COPY default.conf /etc/nginx/conf.d/default.conf
COPY dist/. /usr/share/nginx/html/autoflow
EXPOSE 80
ENTRYPOINT ["nginx", "-g", "daemon off;"]

1
components.d.ts vendored

@ -9,7 +9,6 @@ export {}
declare module 'vue' { declare module 'vue' {
export interface GlobalComponents { export interface GlobalComponents {
AppFooter: typeof import('./src/components/AppFooter.vue')['default'] AppFooter: typeof import('./src/components/AppFooter.vue')['default']
copy: typeof import('./src/components/button/IconModifyBtn copy.vue')['default']
DrawerComponent: typeof import('./src/components/common/DrawerComponent.vue')['default'] DrawerComponent: typeof import('./src/components/common/DrawerComponent.vue')['default']
FormComponent: typeof import('./src/components/run/experiment/FormComponent.vue')['default'] FormComponent: typeof import('./src/components/run/experiment/FormComponent.vue')['default']
HelloWorld: typeof import('./src/components/HelloWorld.vue')['default'] HelloWorld: typeof import('./src/components/HelloWorld.vue')['default']

@ -0,0 +1,16 @@
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /autoflow/index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

@ -0,0 +1,43 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: autoflow
namespace: autoflow
labels:
app: autoflow
spec:
replicas: 1
selector:
matchLabels:
app: autoflow
template:
metadata:
labels:
app: autoflow
spec:
containers:
- image: 192.168.10.120:32100/autoflow:2025.07.005
name: autoflow
ports:
- containerPort: 80
resources:
requests:
cpu: 500m
memory: 100Mi
# limits:
# cpu: 1000m
# memory: 2Gi
---
apiVersion: v1
kind: Service
metadata:
name: autoflow
namespace: autoflow
spec:
type: ClusterIP
selector:
app: autoflow
ports:
- protocol: TCP
port: 80
targetPort: 80

@ -0,0 +1,19 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
namespace: autoflow
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: 1g
name: autoflow
spec:
ingressClassName: nginx
rules:
- http:
paths:
- path: /autoflow
pathType: Prefix
backend:
service:
name: autoflow
port:
number: 80

@ -5,7 +5,7 @@
"version": "0.0.0", "version": "0.0.0",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vite build", "build": "vite build --mode prod",
"preview": "vite preview", "preview": "vite preview",
"lint": "eslint . --fix" "lint": "eslint . --fix"
}, },

@ -1,19 +1,21 @@
// Plugins // Plugins
import AutoImport from 'unplugin-auto-import/vite' import AutoImport from "unplugin-auto-import/vite";
import Components from 'unplugin-vue-components/vite' import Components from "unplugin-vue-components/vite";
import Fonts from 'unplugin-fonts/vite' import Fonts from "unplugin-fonts/vite";
import Layouts from 'vite-plugin-vue-layouts-next' import Layouts from "vite-plugin-vue-layouts-next";
import Vue from '@vitejs/plugin-vue' import Vue from "@vitejs/plugin-vue";
import VueRouter from 'unplugin-vue-router/vite' import VueRouter from "unplugin-vue-router/vite";
import { VueRouterAutoImports } from 'unplugin-vue-router' import { VueRouterAutoImports } from "unplugin-vue-router";
import Vuetify, { transformAssetUrls } from 'vite-plugin-vuetify' import Vuetify, { transformAssetUrls } from "vite-plugin-vuetify";
// Utilities // Utilities
import { defineConfig } from 'vite' import { defineConfig } from "vite";
import { fileURLToPath, URL } from 'node:url' import { fileURLToPath, URL } from "node:url";
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
// 배포할때는 주석 풀기
// base: "/autoflow/",
plugins: [ plugins: [
VueRouter(), VueRouter(),
Layouts(), Layouts(),
@ -24,24 +26,26 @@ export default defineConfig({
Vuetify({ Vuetify({
autoImport: true, autoImport: true,
styles: { styles: {
configFile: 'src/styles/settings.scss', configFile: "src/styles/settings.scss",
}, },
}), }),
Components(), Components(),
Fonts({ Fonts({
google: { google: {
families: [{ families: [
name: 'Roboto', {
styles: 'wght@100;300;400;500;700;900', name: "Roboto",
}], styles: "wght@100;300;400;500;700;900",
},
],
}, },
}), }),
AutoImport({ AutoImport({
imports: [ imports: [
'vue', "vue",
VueRouterAutoImports, VueRouterAutoImports,
{ {
pinia: ['defineStore', 'storeToRefs'], pinia: ["defineStore", "storeToRefs"],
}, },
], ],
eslintrc: { eslintrc: {
@ -52,27 +56,19 @@ export default defineConfig({
], ],
optimizeDeps: { optimizeDeps: {
exclude: [ exclude: [
'vuetify', "vuetify",
'vue-router', "vue-router",
'unplugin-vue-router/runtime', "unplugin-vue-router/runtime",
'unplugin-vue-router/data-loaders', "unplugin-vue-router/data-loaders",
'unplugin-vue-router/data-loaders/basic', "unplugin-vue-router/data-loaders/basic",
], ],
}, },
define: { 'process.env': {} }, define: { "process.env": {} },
resolve: { resolve: {
alias: { alias: {
'@': fileURLToPath(new URL('src', import.meta.url)), "@": fileURLToPath(new URL("src", import.meta.url)),
}, },
extensions: [ extensions: [".js", ".json", ".jsx", ".mjs", ".ts", ".tsx", ".vue"],
'.js',
'.json',
'.jsx',
'.mjs',
'.ts',
'.tsx',
'.vue',
],
}, },
server: { server: {
port: 3000, port: 3000,
@ -80,11 +76,11 @@ export default defineConfig({
css: { css: {
preprocessorOptions: { preprocessorOptions: {
sass: { sass: {
api: 'modern-compiler', api: "modern-compiler",
}, },
scss: { scss: {
api: 'modern-compiler', api: "modern-compiler",
}, },
}, },
}, },
}) });

Loading…
Cancel
Save