File tree Expand file tree Collapse file tree 3 files changed +47
-0
lines changed
Expand file tree Collapse file tree 3 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ # Dockerfile for development on local machine.
2+ #
3+
4+ FROM starefossen/ruby-node:2-6
5+
6+ WORKDIR /srv
7+
8+ RUN gem install compass --no-document && \
9+ gem install tilt --version "1.4.1" --no-document
10+
11+ ADD package.json ./
12+ RUN npm i
13+ CMD ["npm" , "start" ]
Original file line number Diff line number Diff line change @@ -4,3 +4,19 @@ Please go to this [cleaner new repo](https://github.com/hackfoldr/hackfoldr-2.0-
44
55## Why?
66We wiped-out all accidentally commited project specific files in the new repo, and decided to keep this repo for those projects.
7+
8+ ## Development
9+
10+ To run hackfoldr on local machine, please install ` docker ` & ` docker-compose ` first, then run:
11+
12+ ```
13+ $ docker-compose up
14+ ```
15+
16+ This will spin up http://localhost:3000 using the latest code in the current directory.
17+
18+ If you update package.json, you will need to rebuild the base image using:
19+
20+ ```
21+ $ docker-compose up --build
22+ ```
Original file line number Diff line number Diff line change 1+ version : ' 2'
2+
3+ volumes :
4+ # node_modules in hackfoldr service goes to this named volume
5+ # so that local machine's node_modules are not messed up
6+ # https://stackoverflow.com/a/38601156
7+ node_modules :
8+
9+ services :
10+ hackfoldr :
11+ build :
12+ context : .
13+ volumes :
14+ - .:/srv
15+ # node_modules will use named volume instead of the one under current directory
16+ - node_modules:/srv/node_modules
17+ ports :
18+ - 3000:3000
You can’t perform that action at this time.
0 commit comments