Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build a custom docker image of jitsi-meet (web) and integrate it with the dockerized jitsi-meet components #1824

Open
baby-leo opened this issue Jun 18, 2024 · 3 comments

Comments

@baby-leo
Copy link

baby-leo commented Jun 18, 2024

i have cloned “GitHub - jitsi/jitsi-meet: Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.”, and customized it for my liking , now what i am trying to do is to build a docker image of my custom jitsi meet and compose it with the official dockerjitsi meet, replacing the jitsi-web-image. here is my docker file on my custum jitsi-meet

# Use the official Node.js image as the base image
FROM node:16

# Set the working directory inside the container
# COPY /var/www/lib-jitsi-meet  /var/www/
WORKDIR /var/www/customjitsi-meet-folder

# Copy package.json and package-lock.json to the working directory
COPY customjitsi-meet/package.json ./

# Install dependencies with legacy-peer-deps
RUN npm install --legacy-peer-deps

# Copy the rest of your application code to the working directory
COPY . .

# Remove existing lib-jitsi-meet and link the cloned one
RUN rm -rf /var/www/customjitsi-meet-folder/customjitsi-meet/node_modules/lib-jitsi-meet

# Link lib-jitsi-meet
WORKDIR /var/www/customjitsi-meet-folder/lib-jitsi-meet
RUN npm install && npm link

WORKDIR /var/www/customjitsi-meet-folder/customjitsi-meet
RUN npm link lib-jitsi-meet

# Build lib-jitsi-meet
WORKDIR /var/www/customjitsi-meet-folder/lib-jitsi-meet
RUN npm update && npm run build

# Build customjitsi-meet
WORKDIR /var/www/customjitsi-meet-folder/customjitsi-meet
RUN make

# Set environment variables if required
ENV NODE_OPTIONS="--max-old-space-size=8192"

# Build customjitsi-meet
WORKDIR /var/www/customjitsi-meet-folder


# Expose ports 80 and 443
EXPOSE 80 443

# Define the command to run your application



CMD ["npm", "start"]
`
and i am trying to replace the image like as follows
`
web:
        # image: jitsi/web:${JITSI_IMAGE_VERSION:-stable-9457-2}
        image: customjitsi-meet-folder
        # image: jitsimeettest
        restart: ${RESTART_POLICY:-unless-stopped}
        # restart: always
        ports:
            - '8181:80'
            - '8443:443'
        volumes:
            - ${CONFIG}/web:/config
            - ${CONFIG}/web/crontabs:/var/spool/cron/crontabs:Z
            - ${CONFIG}/transcripts:/usr/share/jitsi-meet/transcripts
            
            # - /var/www/docker-jitsi-meet-stable-9457-2/web/:/usr/share/jitsi-meet
        environment:

and when i run compose up -d my custom jitsi meet is not appearing in my browser

so how should i compose my custom jitsi meet ??

@saghul
Copy link
Member

saghul commented Jun 18, 2024

You could use a multi-stage build that builds the frontend and then takes the existing image and replaces the files. You'd run the resulting image.

@baby-leo
Copy link
Author

You could use a multi-stage build that builds the frontend and then takes the existing image and replaces the files. You'd run the resulting image.

ok so how can i do that?

@saghul
Copy link
Member

saghul commented Jun 19, 2024

You can start here: https://docs.docker.com/build/building/multi-stage/

Basically the steps would be:

  • use whatever base image to build the frontend
  • use the latest stable and copy over files from the previous stage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants