From 3c0b41ab7f31948a2b2bb699759f2753e7b103bb Mon Sep 17 00:00:00 2001 From: Ondrej Zara Date: Mon, 28 Oct 2019 11:41:14 +0100 Subject: [PATCH] added Docker support, fixes issue #8 --- .dockerignore | 1 + Dockerfile | 9 +++++++++ README.md | 10 ++++++++++ 3 files changed, 20 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +node_modules diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a094b15 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM node:10 +WORKDIR /cyp +RUN ["mkdir", "_youtube"] +COPY package.json . +RUN npm i +COPY index.js . +COPY app ./app +EXPOSE 8080 +CMD ["node", "."] diff --git a/README.md b/README.md index c62760b..a596287 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,16 @@ node . Point your browser to http://localhost:8080 to open the interface. Specify a custom MPD address via a `server` querystring argument (`?server=localhost:6655`). +## Instalation - Docker + +Alternatively, you can use Docker to run CYP. + +```sh +git clone https://github.com/ondras/cyp.git && cd cyp +docker build -t cyp . +docker run --network=host cyp +``` + ## Technology - Connected to MPD via WebSockets (using the [ws2mpd](https://github.com/ondras/ws2mpd/) bridge)