-
Notifications
You must be signed in to change notification settings - Fork 3
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
890e244
commit 793e250
Showing
5 changed files
with
17 additions
and
249 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,28 @@ | ||
# Note: This Dockerfile assumes context is set to the git root (../../) | ||
|
||
# Use Node 18 Alpine as the base image | ||
FROM node:18-alpine | ||
|
||
# Set the working directory to /app | ||
WORKDIR /app | ||
# Set the working directory to /tmp | ||
WORKDIR /tmp | ||
|
||
# Copy package.json to the working directory | ||
COPY package.json ./ | ||
# Copy files to the working directory | ||
COPY . . | ||
|
||
# Install the dependencies | ||
RUN npm install | ||
|
||
# Copy the rest of the files to the working directory | ||
COPY . . | ||
|
||
# Build the TypeScript project | ||
RUN npm run build --workspace @casimir/users | ||
|
||
# Set the working directory to /app | ||
WORKDIR /app | ||
|
||
# Copy the build assets to the working directory | ||
COPY /tmp/services/users/dist . | ||
|
||
# Expose port 4000 | ||
EXPOSE 4000 | ||
|
||
WORKDIR /app/services/users/dist | ||
|
||
# Run the app when the container launches | ||
CMD ["node", "index.js"] |