Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from AstarNetwork/add/docker
Create Dockerfile
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Use an official Node runtime as a parent image | ||
FROM node:20 | ||
|
||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Copy package.json and package-lock.json for installing dependencies | ||
COPY package*.json ./ | ||
|
||
# Install dependencies | ||
# npm ci is used here for a clean, reproducible install based on package-lock.json | ||
RUN npm ci | ||
|
||
# Copy the rest of your application's code | ||
COPY . . | ||
|
||
# Build your application | ||
RUN npm run build | ||
|
||
# Your application will now be built. Adjust the next commands according to how your app is started. | ||
# Expose the port your app runs on | ||
EXPOSE 3000 | ||
|
||
# Start your application | ||
CMD ["npm", "start"] |