Skip to content

Commit 0715ce1

Browse files
authored
Create Dockerfile
1 parent 465a20f commit 0715ce1

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

apps/webapp/Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM node:18
2+
3+
# Install pnpm globally
4+
RUN npm install -g pnpm
5+
6+
# Set working directory to the root of the monorepo (relative to build context)
7+
WORKDIR /app
8+
9+
# Copy everything from the repo root (since Docker build context will be /app/apps/webapp)
10+
COPY ../../ .
11+
12+
# Install dependencies across the monorepo
13+
RUN pnpm install
14+
15+
# Build only the webapp
16+
RUN pnpm --filter webapp build
17+
18+
# Expose port used by the webapp
19+
EXPOSE 3000
20+
21+
# Set working directory to the webapp
22+
WORKDIR /app/apps/webapp
23+
24+
# Start the app
25+
CMD ["pnpm", "start"]

0 commit comments

Comments
 (0)