init
This commit is contained in:
24
Dockerfile
Normal file
24
Dockerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
FROM public.ecr.aws/docker/library/node
|
||||
|
||||
# Environment
|
||||
ENV PORT=3000 \
|
||||
KIWIX_MANAGE=/usr/bin/kiwix-manage \
|
||||
KIWIX_SERVE=/usr/bin/kiwix-serve \
|
||||
ARCHIVE_DIR=/data/archive \
|
||||
ZIM_DIR=/data/zim
|
||||
|
||||
# Install dependencies
|
||||
RUN apt update && apt upgrade -y && \
|
||||
apt install -y --no-install-recommends \
|
||||
curl docker.io kiwix-tools unzip zim-tools && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Setup app
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN mkdir -p $ARCHIVE_DIR && mkdir -p $ZIM_DIR && npm i
|
||||
|
||||
# Startup
|
||||
EXPOSE $PORT
|
||||
HEALTHCHECK --interval=30s --timeout=5s --retries=3 CMD curl -f http://localhost:$PORT || exit 1
|
||||
CMD ["npm", "run", "start:prod"]
|
||||
Reference in New Issue
Block a user