-
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
e960ecc
commit c3a1da8
Showing
1 changed file
with
15 additions
and
10 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,21 +1,26 @@ | ||
#SET NODE VERSION | ||
# Use the official Node.js 18 image as base | ||
FROM node:18.17.1 | ||
|
||
#CONTAINER WORKING DIRECTORY | ||
# Set the working directory in the container | ||
WORKDIR /usr/src/app | ||
|
||
#COPY FILES INTO CONTANER AT /usr/src/app | ||
COPY . . | ||
# Copy the package.json and package-lock.json (if available) | ||
COPY package*.json ./ | ||
|
||
#TYING TO EXPLICITLY COPY THE CLIENT FOLDER | ||
COPY ./client /usr/src/app/client | ||
# Install root packages | ||
RUN npm install | ||
|
||
#INSTALL ROOT PACKAGES | ||
# Copy the rest of your app's source code from your host to your image filesystem. | ||
COPY . . | ||
|
||
# Navigate to the client directory and install client packages | ||
WORKDIR /usr/src/app/client | ||
COPY client/package*.json ./ | ||
RUN npm install | ||
|
||
#INSTAL CLIENT PACKAGES | ||
RUN cd client && npm install | ||
# Navigate back to the main app directory | ||
WORKDIR /usr/src/app | ||
|
||
#EXPOSE THE WEBPACK-DEV-SERVER PORT | ||
# Expose the port the app runs on | ||
EXPOSE 3000 | ||
|