From 5dccfbeeec3bf56e2bceb7d3a60bd0dd57f6c363 Mon Sep 17 00:00:00 2001 From: GregHilston Date: Thu, 30 Nov 2023 22:28:50 -0500 Subject: [PATCH] feat: add Docker support, and documentation for it --- Dockerfile | 19 +++++++++++++++++++ README.md | 17 +++++++++++++++++ docker-compose.yaml | 9 +++++++++ 3 files changed, 45 insertions(+) create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 docker-compose.yaml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c2ff187 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM node:16 + +# Create app directory +WORKDIR /usr/src/app + +# Install app dependencies +# A wildcard is used to ensure both package.json AND package-lock.json are copied +# where available (npm@5+) +COPY package*.json ./ + +# Download, and prepare the kepubify binary +RUN wget https://github.com/pgaskin/kepubify/releases/download/v4.0.4/kepubify-linux-64bit +RUN mv kepubify-linux-64bit /usr/local/bin/kepubify +RUN chmod +x /usr/local/bin/kepubify + +COPY . . + +EXPOSE 3001 +CMD [ "node", "index" ] diff --git a/README.md b/README.md new file mode 100644 index 0000000..ca0d58c --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# send2ereader + +A self hostable service for sending ebooks to a Kobo or Kindle ereader through the built-in browser. + +## How To Run + +### On Your Host OS + +1. Have Node 16 installed +2. Install this service's dependencies by running `$ npm install` +3. Install [Kepubify](https://github.com/pgaskin/kepubify), and have the executable in your path. +4. Start this service by running: `$ node index` + +### Containerized + +1. Have Docker installed +2. Run `$ docker compose up` diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..c1343a0 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,9 @@ +version: "3" +services: + send2ereader: + build: + context: . + dockerfile: ./Dockerfile + container_name: send3ereader + ports: + - 3001:3001