add kindlegen, update node, more robust Dockerfile
This commit is contained in:
3
.dockerignore
Normal file
3
.dockerignore
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
.git
|
||||||
|
/uploads
|
||||||
|
/node_modules
|
||||||
30
Dockerfile
30
Dockerfile
@@ -1,19 +1,29 @@
|
|||||||
FROM node:16
|
FROM node:20
|
||||||
|
|
||||||
# Create app directory
|
# Create app directory
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
# Copy app files (see .dockerignore)
|
||||||
|
COPY . ./
|
||||||
|
|
||||||
# Install app dependencies
|
# Install app dependencies
|
||||||
# A wildcard is used to ensure both package.json AND package-lock.json are copied
|
RUN npm install --omit=dev
|
||||||
# where available (npm@5+)
|
|
||||||
COPY package*.json ./
|
|
||||||
|
|
||||||
# Download, and prepare the kepubify binary
|
# Download and install kepubify
|
||||||
RUN wget https://github.com/pgaskin/kepubify/releases/download/v4.0.4/kepubify-linux-64bit
|
RUN wget https://github.com/pgaskin/kepubify/releases/download/v4.0.4/kepubify-linux-64bit && \
|
||||||
RUN mv kepubify-linux-64bit /usr/local/bin/kepubify
|
mv kepubify-linux-64bit /usr/local/bin/kepubify && \
|
||||||
RUN chmod +x /usr/local/bin/kepubify
|
chmod +x /usr/local/bin/kepubify
|
||||||
|
|
||||||
COPY . .
|
# 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
|
EXPOSE 3001
|
||||||
CMD [ "node", "index" ]
|
CMD [ "npm", "start" ]
|
||||||
|
|||||||
@@ -4,6 +4,6 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: ./Dockerfile
|
dockerfile: ./Dockerfile
|
||||||
container_name: send3ereader
|
container_name: send2ereader
|
||||||
ports:
|
ports:
|
||||||
- 3001:3001
|
- 3001:3001
|
||||||
|
|||||||
Reference in New Issue
Block a user