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
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Copy app files (see .dockerignore)
|
||||
COPY . ./
|
||||
|
||||
# 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 ./
|
||||
RUN npm install --omit=dev
|
||||
|
||||
# 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
|
||||
# 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
|
||||
|
||||
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
|
||||
CMD [ "node", "index" ]
|
||||
CMD [ "npm", "start" ]
|
||||
|
||||
@@ -4,6 +4,6 @@ services:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./Dockerfile
|
||||
container_name: send3ereader
|
||||
container_name: send2ereader
|
||||
ports:
|
||||
- 3001:3001
|
||||
|
||||
Reference in New Issue
Block a user