mirror of
https://github.com/dennisreimann/kindle-display.git
synced 2026-08-13 12:33:45 +02:00
Dockerize server
This commit is contained in:
parent
146597ce6a
commit
422791094f
2 changed files with 25 additions and 0 deletions
3
server/.dockerignore
Normal file
3
server/.dockerignore
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
.env
|
||||
data.json
|
||||
node_modules
|
||||
22
server/Dockerfile
Normal file
22
server/Dockerfile
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
FROM node:14-buster-slim AS builder
|
||||
WORKDIR /build
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y git python3 build-essential
|
||||
COPY . .
|
||||
RUN npm ci --production
|
||||
|
||||
FROM node:14-buster-slim
|
||||
WORKDIR /build
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y firefox-esr pngcrush jo jq torsocks curl cron
|
||||
COPY --from=builder /build .
|
||||
ADD .env.sample .env
|
||||
RUN echo "PATH=/bin:/usr/bin:/usr/local/bin\n* * * * * root /bin/bash /build/cron.sh > /build/cron.log\n#" | crontab -
|
||||
RUN service cron start
|
||||
EXPOSE 3030
|
||||
CMD ["npm", "start"]
|
||||
|
||||
|
||||
# docker build -t kindle-display .
|
||||
# docker run --name kindle-display -p 3030:3030 -it kindle-display
|
||||
# docker exec -it kindle-display bash
|
||||
Loading…
Add table
Add a link
Reference in a new issue