Skip to content

Commit df39aa4

Browse files
author
dodo
committed
Update Dockerfile
1 parent b9bd4a6 commit df39aa4

File tree

5 files changed

+1264
-22
lines changed

5 files changed

+1264
-22
lines changed

Dockerfile

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM node:12
2+
3+
WORKDIR /code.mju-rats.com-FE
4+
# RUN npm rebuild esbuild
5+
# RUN npm install -g pm2
6+
7+
COPY package*.json ./
8+
COPY yarn.lock ./
9+
10+
COPY . .
11+
RUN rm -rf node_modules
12+
RUN npm install
13+
14+
EXPOSE 3000
15+
# CMD ["npx", "pm2", "start", "ecosystem.config.js", "--no-daemon"]
16+
# CMD ["webpack-dev-server", "--host", "0.0.0.0", "--port", "3000"]
17+
CMD ["npm", "run", "dev"]

ecosystem.config.js

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
module.exports = {
2+
apps : [{
3+
script: 'npm run dev',
4+
watch: '.',
5+
time: true
6+
}],
7+
8+
deploy : {
9+
production : {
10+
user : 'SSH_USERNAME',
11+
host : 'SSH_HOSTMACHINE',
12+
ref : 'origin/master',
13+
repo : 'GIT_REPOSITORY',
14+
path : 'DESTINATION_PATH',
15+
'pre-deploy-local': '',
16+
'post-deploy' : 'npm install && pm2 reload ecosystem.config.js --env production',
17+
'pre-setup': ''
18+
}
19+
}
20+
};

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"vue-router": "^3.0.1",
2424
"vue-template-compiler": "^2.6.14",
2525
"vuex": "^3.0.1",
26-
"vuex-router-sync": "^5.0.0"
26+
"vuex-router-sync": "^5.0.0",
27+
"webpack-dev-server": "^4.8.1"
2728
},
2829
"devDependencies": {
2930
"@originjs/vite-plugin-commonjs": "^1.0.1",
@@ -63,6 +64,8 @@
6364
"vue-jest": "^1.0.2",
6465
"vue2-editor": "2.3.11",
6566
"vuedraggable": "^2.16.0",
67+
"webpack": "^5.72.0",
68+
"webpack-cli": "^4.9.2",
6669
"zip-folder": "^1.0.0"
6770
},
6871
"engines": {

vite.config.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,11 @@ export default defineConfig({
9797
}
9898
},
9999
server: {
100+
host: '0.0.0.0',
101+
port: 3000,
100102
proxy: {
101103
'/api': {
102-
target: 'http://localhost:8888',
104+
target: 'http://0.0.0.0:8888',
103105
changeOrigin: true
104106
}
105107
}

0 commit comments

Comments
 (0)