-
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
Showing
3 changed files
with
103 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Use Node.js 20 | ||
FROM node:20 | ||
|
||
# Set the working directory | ||
WORKDIR /app | ||
|
||
# Copy package.json and package-lock.json | ||
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ | ||
COPY frontend/package.json frontend/ | ||
COPY api/package.json api/ | ||
COPY shared/package.json shared/ | ||
|
||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
|
||
# Install pnpm 8 | ||
RUN npm install -g pnpm@8 | ||
|
||
# Install dependencies | ||
RUN pnpm install | ||
|
||
# Copy all files to the container | ||
COPY . . | ||
|
||
# Check formatting | ||
RUN pnpm run format-check | ||
|
||
# Build the app | ||
RUN pnpm run build | ||
|
||
# Expose the port | ||
EXPOSE 5173 | ||
|
||
ENV PORT 5173 | ||
# set hostname to localhost | ||
ENV HOSTNAME "0.0.0.0" | ||
|
||
# Start the app | ||
CMD ["pnpm", "dev:web"] | ||
|
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Use Node.js 20 | ||
FROM node:20 | ||
|
||
# Set the working directory | ||
WORKDIR /app | ||
|
||
# Copy package.json and package-lock.json | ||
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ | ||
COPY frontend/package.json frontend/ | ||
COPY api/package.json api/ | ||
COPY shared/package.json shared/ | ||
|
||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
|
||
# Install pnpm 8 | ||
RUN npm install -g pnpm@8 | ||
|
||
# Install dependencies | ||
RUN pnpm install | ||
|
||
# Copy all files to the container | ||
COPY . . | ||
|
||
# Check formatting | ||
RUN pnpm run format-check | ||
|
||
# Build the app | ||
RUN pnpm run build | ||
|
||
# Expose the port | ||
EXPOSE 3000 | ||
|
||
ENV PORT 3000 | ||
# set hostname to localhost | ||
ENV HOSTNAME "0.0.0.0" | ||
|
||
# Start the app | ||
CMD ["pnpm", "dev:api"] | ||
|
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