File tree Expand file tree Collapse file tree 4 files changed +40
-6
lines changed Expand file tree Collapse file tree 4 files changed +40
-6
lines changed Original file line number Diff line number Diff line change
1
+ node_modules
2
+ npm-debug *
3
+ .nuxt
Original file line number Diff line number Diff line change
1
+ FROM node:14.16
2
+
3
+ WORKDIR /var/www
4
+
5
+ COPY . /var/www
6
+
7
+ RUN npm install \
8
+ && npm run build
9
+
10
+ EXPOSE 3000
11
+
12
+ CMD [ "npm" , "run" , "start" ]
Original file line number Diff line number Diff line change 6
6
7
7
## Build Setup
8
8
9
- ``` bash
9
+ ``` shell
10
10
# install dependencies
11
11
$ npm install # Or yarn install
12
12
13
- # install babel 7 (optional)
14
- $ npm install --save-dev @babel/core @babel/preset-env
15
-
16
13
# serve with hot reload at localhost:3000
17
14
$ npm run dev
15
+ ```
16
+ Open http://localhost:3000
18
17
18
+ ## Production
19
+ ``` shell
19
20
# build for production and launch server
20
21
$ npm run build
21
22
$ npm start
22
23
23
- # generate static project
24
- $ npm run generate
24
+ # or generate static project
25
+ # npm run generate
26
+ ```
27
+
28
+ ## Docker
29
+ ``` shell
30
+ $ docker build -t nuxt_dashboard .
31
+ $ docker run -it -e HOST=0.0.0.0 -p 3000:3000 nuxt_dashboard
25
32
```
33
+ Open http://` docker-machine ip ` :3000
26
34
27
35
For detailed explanation on how things work, check out:
28
36
- [ Material-dashboard] ( https://demos.creative-tim.com/material-dashboard/docs/2.1/getting-started/introduction.html ) documentation
Original file line number Diff line number Diff line change
1
+ version : ' 3'
2
+ services :
3
+ nuxt :
4
+ build : ' .'
5
+ restart : always
6
+ ports :
7
+ - 3000:3000
8
+ environment :
9
+ - HOST=0.0.0.0
10
+ - PORT=3000
11
+ command : ' npm run start'
You can’t perform that action at this time.
0 commit comments