-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
430b380
commit 134bf13
Showing
5 changed files
with
18 additions
and
22 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,26 +1,22 @@ | ||
# Use an official Node runtime as the base image | ||
FROM node:20.11-slim | ||
FROM node:20.18-slim | ||
|
||
RUN apt-get update -y && apt-get install -y openssl \ | ||
python3 \ | ||
make \ | ||
gcc \ | ||
g++ \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Copy package.json and yarn.lock files | ||
COPY package.json yarn.lock ./ | ||
COPY . . | ||
|
||
# Install dependencies | ||
# Install production dependencies. | ||
RUN yarn install | ||
|
||
# Copy the rest of the application code | ||
COPY . . | ||
|
||
# Build the application | ||
# Install production dependencies. | ||
RUN yarn build | ||
|
||
# Install a simple http server for serving static content | ||
RUN yarn global add serve | ||
|
||
# The application's default port | ||
EXPOSE 3000 | ||
|
||
# Command to run the application | ||
CMD ["serve", "-s", "build", "-l", "3000"] | ||
# Start the api server | ||
CMD [ "yarn", "start" ] | ||
EXPOSE 3000 |
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
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
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
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