Skip to content

Commit

Permalink
add docker config
Browse files Browse the repository at this point in the history
  • Loading branch information
Axel Becerril (sk) committed May 23, 2021
1 parent 4cb7c5e commit ccc5a82
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM node:14

WORKDIR /usr/src/app

COPY . .

RUN npm install

CMD ["node", "server.js"]
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,29 @@ You can open the overlay in a regular web browser by visiting `http://localhost:

Always use OBS as the final reference for how things will look during a stream!

## Using Docker Compose

To use the Docker images configured with compose, you need [docker-compose](https://docs.docker.com/compose/install/). Once it's up a running, you simply do

```
docker-compose up --detach
```

To stop the server

```
docker-compose down
```

The config maps container's `8080` port to `localhost:8080`. If you need to use another localhost port, you need to change it in `docker-compose.yml` under the `ports` section. For example, to use the port `3000` you need to set the section as:

```yaml
ports:
- "3000:8080"
```
The port number after the colon would be the port configured in `config.json`.

## Adding the browser source in OBS

1. In an OBS Scene, add a new 'Browser' Source.
Expand Down
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: "3.8"

services:
app:
build: .
ports:
- "8080:8080"
volumes:
- ./:/usr/src/app

0 comments on commit ccc5a82

Please sign in to comment.