add docker support

This commit is contained in:
AceDataCloud committed 2021-08-28 00:31:39 +08:00
1 parent 504097d407
commit 94ab7ebe17
5 files changed
+21 -8

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
node_modules/
dist/
docker-compose.yaml
+13
View File
@@ -0,0 +1,13 @@
# build stage
FROM node:lts-alpine as build-stage
WORKDIR /app
COPY package*.json ./
RUN yarn
COPY . .
RUN yarn build
# production stage
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
+2 -4
View File
@@ -1,12 +1,10 @@
<template>
<div>ddd</div>
<div>Hello World</div>
</template>
<script lang="ts">
export default {
components: {
// LayoutHome
},
components: {},
data() {
return {};
},
+3 -3
View File
@@ -1,11 +1,11 @@
import { createRouter, createWebHistory } from 'vue-router';
import Home from '@/components/HelloWorld.vue';
import HelloWorld from '@/components/HelloWorld.vue';
const routes = [
{
path: '/',
name: 'Home',
component: Home
name: 'HelloWorld',
component: HelloWorld
}
];
-1
View File
@@ -1,4 +1,3 @@
import { createApp } from 'vue';
import { createStore } from 'vuex';
interface IState {