-
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
1 parent
722052a
commit 1d07476
Showing
1 changed file
with
14 additions
and
7 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,16 +1,23 @@ | ||
FROM node:14 | ||
# Use the official Node.js image | ||
FROM node:alpine | ||
|
||
# Copy everything from the current directory into the Docker image | ||
COPY . /app | ||
|
||
# Set working directory inside the container | ||
# Set the working directory | ||
WORKDIR /app | ||
|
||
# Copy package.json and yarn.lock | ||
COPY package.json yarn.lock ./ | ||
|
||
# Install dependencies | ||
RUN yarn install | ||
|
||
# Compile TypeScript | ||
# Copy the rest of the app | ||
COPY . . | ||
|
||
# Build the app | ||
RUN yarn build | ||
|
||
# Start command as defined in package.json | ||
# Expose the port the app runs on | ||
EXPOSE 3000 | ||
|
||
# Command to run the app | ||
CMD ["yarn", "start"] |