Skip to content

Commit 1d9a453

Browse files
authored
Merge pull request #1390 from outoftime/docker
Simple Docker development setup
2 parents 7b579c7 + 4e1a3af commit 1d9a453

3 files changed

Lines changed: 29 additions & 2 deletions

File tree

Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM node:8.10
2+
3+
RUN echo '{"allow_root": true}' > /root/.bowerrc
4+
5+
WORKDIR /app
6+
ADD . /app
7+
8+
EXPOSE 3000

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,15 @@ feedback from dozens of instructors.
132132

133133
### Running locally ###
134134

135-
Pretty easy. Just check out the code. You’ll need [Yarn](https://yarnpkg.com/),
136-
which is the cool new NPM. It’s [easy to
135+
#### With Docker
136+
137+
If you already use Docker, your best bet is to use it for Popcode development
138+
too. A simple `docker-compose up` will do the trick.
139+
140+
#### Without Docker
141+
142+
Still pretty easy. Just check out the code. You’ll need
143+
[Yarn](https://yarnpkg.com/), which is the cool new NPM. It’s [easy to
137144
install](https://yarnpkg.com/en/docs/install).
138145

139146
Once you’ve got it just run:

docker-compose.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: '3'
2+
services:
3+
app:
4+
build: .
5+
command: yarn dev
6+
ports:
7+
- "3000:3000"
8+
volumes:
9+
- .:/app:cached
10+
- node_modules:/app/node_modules
11+
volumes:
12+
node_modules:

0 commit comments

Comments
 (0)