forked from taipei-doit/Taipei-City-Dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,21 @@ | ||
FROM node:20.11.1-alpine3.19 | ||
# Use the official lightweight Node.js 18 image. | ||
# https://hub.docker.com/_/node | ||
FROM node:19-alpine | ||
|
||
WORKDIR /opt/aipei-City-Dashboard-FE | ||
# Create and change to the app directory. | ||
WORKDIR /usr/src/app | ||
|
||
COPY ./ ./ | ||
# Copy application dependency manifests to the container image. | ||
# A wildcard is used to ensure both package.json AND package-lock.json are copied. | ||
# Copying this separately prevents re-running npm install on every code change. | ||
COPY package*.json ./ | ||
|
||
# Install dependencies. | ||
# If you add a package-lock.json speed your build by switching to 'npm ci'. | ||
RUN npm install | ||
|
||
CMD ["npm", "start"] | ||
# Copy local code to the container image. | ||
COPY . ./ | ||
|
||
# Run the web service on container startup. | ||
CMD ["npm", "run", "dev"] |