Merge pull request #17 from GregHilston/feat-docker-support
feat: add Docker support, and documentation for it
This commit is contained in:
3
.dockerignore
Normal file
3
.dockerignore
Normal file
@@ -0,0 +1,3 @@
|
||||
.git
|
||||
/uploads
|
||||
/node_modules
|
||||
29
Dockerfile
Normal file
29
Dockerfile
Normal file
@@ -0,0 +1,29 @@
|
||||
FROM node:20
|
||||
|
||||
# Create app directory
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Copy app files (see .dockerignore)
|
||||
COPY . ./
|
||||
|
||||
# Install app dependencies
|
||||
RUN npm install --omit=dev
|
||||
|
||||
# Download and install kepubify
|
||||
RUN wget https://github.com/pgaskin/kepubify/releases/download/v4.0.4/kepubify-linux-64bit && \
|
||||
mv kepubify-linux-64bit /usr/local/bin/kepubify && \
|
||||
chmod +x /usr/local/bin/kepubify
|
||||
|
||||
# Download and install kindlegen
|
||||
RUN wget https://archive.org/download/kindlegen2.9/kindlegen_linux_2.6_i386_v2_9.tar.gz && \
|
||||
mkdir kindlegen && \
|
||||
tar xvf kindlegen_linux_2.6_i386_v2_9.tar.gz --directory kindlegen && \
|
||||
cp kindlegen/kindlegen /usr/local/bin/kindlegen && \
|
||||
chmod +x /usr/local/bin/kindlegen && \
|
||||
rm -rf kindlegen
|
||||
|
||||
# Create uploads directory if it doesn't exist
|
||||
RUN mkdir uploads
|
||||
|
||||
EXPOSE 3001
|
||||
CMD [ "npm", "start" ]
|
||||
19
README.md
Normal file
19
README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# 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.js 16 or 20 installed
|
||||
2. Install this service's dependencies by running `$ npm install`
|
||||
3. Install [Kepubify](https://github.com/pgaskin/kepubify), and have the kepubify executable in your PATH.
|
||||
4. Install [KindleGen](https://archive.org/details/kindlegen2.9), and have the kindlegen executable in your PATH.
|
||||
5. Start this service by running: `$ npm start` and access it on HTTP port 3001
|
||||
|
||||
### Containerized
|
||||
|
||||
1. Have Docker installed
|
||||
2. Run `$ docker compose up`
|
||||
3. Access the service on HTTP port 3001
|
||||
9
docker-compose.yaml
Normal file
9
docker-compose.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
version: "3"
|
||||
services:
|
||||
send2ereader:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./Dockerfile
|
||||
container_name: send2ereader
|
||||
ports:
|
||||
- 3001:3001
|
||||
Reference in New Issue
Block a user