-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
45 lines (32 loc) · 1.14 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Use a base image that includes both Node.js and Python
FROM nikolaik/python-nodejs:python3.9-nodejs16
# less and nano for debugging
RUN apt-get update && \
apt-get install -y less && \
apt-get install -y nano && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Set the working directory in the container
WORKDIR /usr/src/app
# Copy package.json and package-lock.json
COPY package*.json ./
# Install Node.js dependencies
RUN npm install
# Install the grepbible CLI tool
RUN pip install grepbible
# Create the directory for grepbible data
RUN mkdir -p /root/grepbible_data
# Set environment variable for grepbible data path
ENV LOCAL_BIBLE_DIR=/root/grepbible_data
# Add the Python user base bin directory to PATH
ENV PATH="${PATH}:/root/.local/bin"
# Download a few Bibles
RUN gbib -d kj,vg,de,po-BR,pl,ru,he
# Copy the rest of the application
COPY . .
# Set GIT_VERSION environment variable during build
RUN echo "GIT_VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo 'dev') from $(date +%d.%m.%Y)" > /usr/src/app/.env
# Expose port (adjust if different)
EXPOSE 4628
# Command to run the application
CMD ["node", "server.js"]