Skip to content

Commit

Permalink
feat(root): dockerize project (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbadri authored Apr 20, 2024
1 parent 07acc38 commit 0b75a85
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
npm-debug.log
yarn-error.log
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use an official Node.js runtime as a parent image
FROM docker.arvancloud.ir/node:21-alpine3.18


# Set the working directory in the container
WORKDIR /app

# Copy package.json and package-lock.json (or yarn.lock)
COPY package.json ./
COPY package-lock.json ./

# Install dependencies
RUN npm install --frozen-lockfile

# Add the rest of the code
COPY . .

# Build the project (specify the project name if needed)
RUN npx nx build docs --skip-nx-cache



# Expose the port the app runs on
EXPOSE 4200

# Run the application
CMD ["npx", "nx", "serve", "docs"]

0 comments on commit 0b75a85

Please sign in to comment.