docker: update Dockerfile to use Docker-specific workspace file and adjust pnpm install options
This commit is contained in:
parent
46bbeacc66
commit
8764fda04d
@ -18,7 +18,9 @@ RUN mkdir -p meet-ce/typings meet-ce/frontend/webcomponent meet-ce/backend && \
|
|||||||
USER node
|
USER node
|
||||||
|
|
||||||
# Copy workspace configuration files
|
# Copy workspace configuration files
|
||||||
COPY --chown=node:node pnpm-workspace.yaml .npmrc package.json pnpm-lock.yaml ./
|
# Use Docker-specific workspace file that excludes external packages
|
||||||
|
COPY --chown=node:node pnpm-workspace.docker.yaml ./pnpm-workspace.yaml
|
||||||
|
COPY --chown=node:node .npmrc package.json pnpm-lock.yaml ./
|
||||||
|
|
||||||
# Copy package.json files for all workspace packages
|
# Copy package.json files for all workspace packages
|
||||||
COPY --chown=node:node meet-ce/typings/package.json ./meet-ce/typings/
|
COPY --chown=node:node meet-ce/typings/package.json ./meet-ce/typings/
|
||||||
@ -37,7 +39,7 @@ COPY --chown=node:node meet.sh .
|
|||||||
ARG BASE_HREF=/
|
ARG BASE_HREF=/
|
||||||
|
|
||||||
# Build OpenVidu Meet project
|
# Build OpenVidu Meet project
|
||||||
RUN pnpm install --frozen-lockfile && \
|
RUN pnpm install --no-frozen-lockfile && \
|
||||||
./meet.sh build --skip-install --base-href=${BASE_HREF}
|
./meet.sh build --skip-install --base-href=${BASE_HREF}
|
||||||
|
|
||||||
# Clean up development dependencies and unnecessary files
|
# Clean up development dependencies and unnecessary files
|
||||||
@ -65,7 +67,7 @@ ENV PNPM_VERSION=${PNPM_VERSION}
|
|||||||
RUN apk add --no-cache bash
|
RUN apk add --no-cache bash
|
||||||
|
|
||||||
# Install pnpm
|
# Install pnpm
|
||||||
RUN corepack enable && corepack prepare pnpm@${PNPM_VERSION} --activate && ls -al .
|
RUN corepack enable && corepack prepare pnpm@${PNPM_VERSION} --activate
|
||||||
|
|
||||||
WORKDIR /opt/openvidu-meet
|
WORKDIR /opt/openvidu-meet
|
||||||
|
|
||||||
|
|||||||
12
meet.sh
12
meet.sh
@ -708,8 +708,9 @@ clone_meet_pro() {
|
|||||||
# Build Docker image
|
# Build Docker image
|
||||||
build_docker() {
|
build_docker() {
|
||||||
local image_name="$1"
|
local image_name="$1"
|
||||||
# Remove first argument (image name)
|
local components_next_version
|
||||||
shift || true
|
components_next_version=$(pnpm view openvidu-components-angular@next version | tr -d '\r\n')
|
||||||
|
shift || true # Remove first argument (image name)
|
||||||
|
|
||||||
# Validate arguments
|
# Validate arguments
|
||||||
if [ -z "$image_name" ]; then
|
if [ -z "$image_name" ]; then
|
||||||
@ -754,7 +755,8 @@ build_docker() {
|
|||||||
# Optionally install latest components to avoid local dist symlink inside image
|
# Optionally install latest components to avoid local dist symlink inside image
|
||||||
if [ "$use_latest_components" = true ]; then
|
if [ "$use_latest_components" = true ]; then
|
||||||
echo "🔧 Installing latest openvidu-components-angular..."
|
echo "🔧 Installing latest openvidu-components-angular..."
|
||||||
pnpm --filter @openvidu-meet/frontend install openvidu-components-angular@next
|
sed -i 's|"openvidu-components-angular": "workspace:\*"|"openvidu-components-angular": "^3.0.0"|g' meet-ce/frontend/projects/shared-meet-components/package.json
|
||||||
|
pnpm --filter @openvidu-meet/frontend install openvidu-components-angular@${components_next_version}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "${GREEN}Using BASE_HREF: $base_href${NC}"
|
echo -e "${GREEN}Using BASE_HREF: $base_href${NC}"
|
||||||
@ -772,7 +774,9 @@ build_docker() {
|
|||||||
# Restore local link if we temporarily installed latest components
|
# Restore local link if we temporarily installed latest components
|
||||||
if [ "$use_latest_components" = true ]; then
|
if [ "$use_latest_components" = true ]; then
|
||||||
echo "🔧 Restoring openvidu-components-angular to local dist link..."
|
echo "🔧 Restoring openvidu-components-angular to local dist link..."
|
||||||
pnpm --filter @openvidu-meet/frontend install openvidu-components-angular@link:../../../openvidu/openvidu-components-angular/dist/openvidu-components-angular
|
sed -i 's|"openvidu-components-angular": "^3.0.0"|"openvidu-components-angular": "workspace:*"|g' meet-ce/frontend/projects/shared-meet-components/package.json
|
||||||
|
sed -i 's|"openvidu-components-angular": "'"${components_next_version}"'"|"openvidu-components-angular": "workspace:*"|g' meet-ce/frontend/package.json
|
||||||
|
pnpm install --no-frozen-lockfile
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
17
pnpm-workspace.docker.yaml
Normal file
17
pnpm-workspace.docker.yaml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
packages:
|
||||||
|
- meet-ce/typings
|
||||||
|
- meet-ce/frontend
|
||||||
|
- meet-ce/frontend/webcomponent
|
||||||
|
- meet-ce/frontend/projects/shared-meet-components
|
||||||
|
- meet-ce/backend
|
||||||
|
|
||||||
|
ignoredBuiltDependencies:
|
||||||
|
- '@parcel/watcher'
|
||||||
|
- chromedriver
|
||||||
|
- core-js
|
||||||
|
- esbuild
|
||||||
|
- lmdb
|
||||||
|
- msgpackr-extract
|
||||||
|
|
||||||
|
onlyBuiltDependencies:
|
||||||
|
- bcrypt
|
||||||
Loading…
x
Reference in New Issue
Block a user