diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5e173c2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM node:14 + +WORKDIR /usr/src/app + +COPY . . + +RUN npm install + +CMD ["node", "server.js"] diff --git a/README.md b/README.md index 5b1904f..e81318b 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..54e8e40 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +version: "3.8" + +services: + app: + build: . + ports: + - "8080:8080" + volumes: + - ./:/usr/src/app