Skip to content

Commit

Permalink
Merge pull request #3 from benjaminch/master
Browse files Browse the repository at this point in the history
[Docker] Add Docker support
  • Loading branch information
mtharrison authored Dec 31, 2019
2 parents 8abbac5 + 107614c commit e88bc03
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
npm-debug.log
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:slim

WORKDIR /usr/src/app

COPY package*.json ./

RUN npm install
RUN npm ci --only=production

COPY . .

EXPOSE 4000
CMD [ "node", "server.js" ]
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,22 @@ There are some Rust tests, to run them run:

- `npm test` or `cargo test`

#### Using Docker

Build the image:

- `docker build -t mtharrison/wasmbooth .`

Run the image (on port 4000):

- `docker run -p 4000:4000 mtharrison/wasmbooth`

#### Using Docker with docker-compose

```
docker-compose up --build
```

### Contributing

PRs welcome to improve the code or approach or to add more effects, this is all about learning! I'm a newbie to both Rust and wasm so please open an issue if you think there's something I missed or could have done better.
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: '3.7'
services:
wasmbooth:
build: .
restart: always
ports:
- 4000:4000

0 comments on commit e88bc03

Please sign in to comment.