├── Dockerfile └── README.md /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nodesource/node:trusty 2 | 3 | RUN mkdir -p /usr/src/npm 4 | WORKDIR /usr/src/npm 5 | 6 | RUN npm install fis3 7 | RUN npm install fis3-hook-module 8 | RUN npm install fis3-postpackager-loader 9 | RUN npm install fis-parser-less-2.x 10 | RUN npm install fis-parser-sass 11 | 12 | ENV PATH=/usr/src/npm/node_modules/.bin:$PATH 13 | 14 | EXPOSE 8080 15 | 16 | RUN mkdir -p /usr/src/app 17 | WORKDIR /usr/src/app 18 | 19 | CMD ["bash"] 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## image of docker for fis 2 | 3 | 4 | ### USE 5 | 6 | #### start 7 | 8 | - open a terminal ( iterm2 or konsole or same one) 9 | - run docker 10 | 11 | ``` 12 | boot2docker start 13 | boot2docker shellinit 14 | ``` 15 | - go to the project ROOT of fis 16 | 17 | ``` 18 | cd path/to/fis/proj 19 | ``` 20 | - run a container from fis image 21 | 22 | ``` 23 | docker run -it -P -v "$PWD":/usr/src/app --rm --name fis fis 24 | ``` 25 | 26 | - enter the container RUN 27 | 28 | ``` 29 | fis3 server start 30 | ``` 31 | 32 | **NOTICE** keep container running, not exist 33 | 34 | #### visit FIS server 35 | 36 | - **[MUST]** open other Terminal 37 | - get real port of the FIS server 38 | 39 | ``` 40 | docker port fis 41 | ``` 42 | 43 | - get IP 44 | 45 | ``` 46 | boot2docker ip 47 | ``` 48 | - such port `32769`, Browser open `:32769` 49 | 50 | #### release project 51 | 52 | - go to the project root of fis 53 | 54 | ``` 55 | cd path/to/fis/proj 56 | ``` 57 | 58 | - RUN release command 59 | 60 | ```bash 61 | ### only release 62 | docker exec fis fis3 release 63 | # with watch 64 | docker exec fis fis3 release -w 65 | # to local dir 66 | docker exec fis fis3 release -d ./output 67 | ``` 68 | 69 | **NOTICE** 70 | 71 | watch feature must set 72 | 73 | ```js 74 | fis.set('project.watch.usePolling', true); 75 | ``` 76 | 77 | to `fis-conf.js` 78 | 79 | ### todo 80 | 81 | - [ ] support livereload port map 82 | --------------------------------------------------------------------------------