File tree Expand file tree Collapse file tree 5 files changed +42
-148
lines changed Expand file tree Collapse file tree 5 files changed +42
-148
lines changed Original file line number Diff line number Diff line change @@ -14,26 +14,26 @@ jobs:
1414 - uses : actions/checkout@master
1515 with :
1616 fetch-depth : 0
17-
17+
1818 - name : Setup environment
1919 id : setups
2020 run : |-
2121 echo "::set-output name=yarn_cache::$(yarn cache dir)"
2222 echo "::set-output name=node_version::$(cat .nvmrc)"
23-
23+
2424 - name : Setup Node ${{ steps.setups.outputs.node_version }}
2525 uses : actions/setup-node@master
2626 with :
2727 node-version : ${{ steps.setups.outputs.node_version }}
28-
28+
2929 - name : Yarn cache
3030 uses : actions/cache@v1
3131 with :
3232 path : ${{ steps.setups.outputs.yarn_cache }}
3333 key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-node-${{ steps.setups.outputs.node_version }}
34-
34+
3535 - run : yarn --frozen-lockfile
36-
36+
3737 - name : Create Release or Publish
3838 uses : changesets/action@master
3939 with :
Original file line number Diff line number Diff line change 1+ FROM node:12.8-alpine as test-target
2+ ENV NODE_ENV=test
3+ ENV PATH $PATH:/usr/src/app/node_modules/.bin
4+ WORKDIR /usr/src/app
5+ COPY package*.json ./
6+ RUN npm install
7+ COPY . .
8+
9+ # Build
10+ FROM test-target as build-target
11+ ENV NODE_ENV=production
12+ ENV PATH $PATH:/usr/src/app/node_modules/.bin
13+ WORKDIR /usr/src/app
14+ RUN npm run build
15+ RUN npm prune --production
16+
17+ # Archive
18+ FROM node:12.8-alpine as archive-target
19+ ENV NODE_ENV=production
20+ ENV PATH $PATH:/usr/src/app/node_modules/.bin
21+ WORKDIR /usr/src/app
22+
23+ # Include only the release build and production packages.
24+ COPY --from=build-target /usr/src/app/node_modules node_modules
25+ COPY --from=build-target /usr/src/app/.next .next
26+
27+ ENV DATA_DIR /data
28+ RUN mkdir -p /data
29+
30+ EXPOSE 3000
31+ CMD ["next" , "start" ]
Original file line number Diff line number Diff line change 55 "scripts" : {
66 "dev" : " next dev -p 3000" ,
77 "build" : " next build" ,
8- "start" : " next start"
9- } ,
10- "bin " : {
11- "mfdash " : " ./bin/mfdash.js "
8+ "start" : " next start" ,
9+ "docker:build" : " docker build . -t mf-dashboard " ,
10+ "docker:run " : " docker run -p 3000:3000 -t mf-dashboard " ,
11+ "docker:demo " : " docker run -p 3000:3000 --mount type=bind,source= \" $(pwd) \" /.fm-dashboard,target=/data -t mf-dashboard "
1212 },
1313 "contributors" : [
1414 {
Original file line number Diff line number Diff line change 11import Datastore from "nedb" ;
22import path from "path" ;
3- import fetch from "node-fetch" ;
43
5- const dir = process . env . DATA_DIR || process . cwd ( ) ;
4+ const dir = process . env . DATA_DIR || path . join ( process . cwd ( ) , "./.fm-dashboard" ) ;
65
76const db = new Datastore ( {
8- filename : path . join ( dir , "./.fm-dashboard /apps.db" ) ,
7+ filename : path . join ( dir , "/apps.db" ) ,
98} ) ;
109db . loadDatabase ( ) ;
1110
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments