forked from BrownCLPS/LingView
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (21 loc) · 722 Bytes
/
Copy pathDockerfile
File metadata and controls
30 lines (21 loc) · 722 Bytes
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
# Use Node 16 base image
FROM node:16
# Set environment variables
ENV SHELL=/bin/sh
# Set working directory
WORKDIR /app
# Copy package.json and package-lock.json first (for better cache usage)
COPY package*.json ./
# Install dependencies
RUN npm install
# Install chokidar-cli globally
RUN npm install -g chokidar-cli
# Install http-server globally (if you need to serve static files)
RUN npm install -g http-server
# Copy all remaining files into the container
COPY . .
# Expose port (if your app serves content via dev server or express — adjust if needed)
EXPOSE 3000
# Start both chokidar (watching for changes and triggering rebuild)
# and http-server (serving files)
CMD ["npm", "run", "watch-and-serve"]