diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..05286353 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,34 @@ +name: build + +on: + push: + branches: + - main + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + + - name: Build and publish + uses: docker/build-push-action@v3 + with: + context: ./ + file: ./Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: mirotalk/p2p:latest \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index e7732dd9..485c95fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,24 @@ -FROM node:18-alpine -# https://hub.docker.com/_/node +# Use a lightweight Node.js image +FROM node:20-alpine +# Set working directory WORKDIR /src -RUN apk add --no-cache \ - bash \ - vim - +# Copy package.json and .env dependencies COPY package.json . COPY .env.template ./.env -RUN \ - npm install && \ - npm cache clean --force && \ - rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/* /usr/share/doc/* +# Install necessary system packages and dependencies +RUN apk add --no-cache \ + bash \ + vim \ + && npm install \ + && npm cache clean --force \ + && rm -rf /tmp/* /var/tmp/* /usr/share/doc/* +# Copy the application code COPY app app COPY public public -EXPOSE 3000/tcp - -CMD npm start \ No newline at end of file +# Set default command to start the application +CMD ["npm", "start"] \ No newline at end of file diff --git a/app/src/server.js b/app/src/server.js index ff28df67..ef67f9c8 100755 --- a/app/src/server.js +++ b/app/src/server.js @@ -40,7 +40,7 @@ dependencies: { * @license For commercial use or closed source, contact us at license.mirotalk@gmail.com or purchase directly from CodeCanyon * @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661 * @author Miroslav Pejic - miroslav.pejic.85@gmail.com - * @version 1.3.31 + * @version 1.3.32 * */ diff --git a/package.json b/package.json index cab336c6..68fd714a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mirotalk", - "version": "1.3.31", + "version": "1.3.32", "description": "A free WebRTC browser-based video call", "main": "server.js", "scripts": { @@ -51,7 +51,7 @@ "jsonwebtoken": "^9.0.2", "ngrok": "^5.0.0-beta.2", "nodemailer": "^6.9.13", - "openai": "^4.44.0", + "openai": "^4.45.0", "qs": "^6.12.1", "socket.io": "^4.7.5", "swagger-ui-express": "^5.0.0", diff --git a/public/js/client.js b/public/js/client.js index 756dc983..cf964b02 100644 --- a/public/js/client.js +++ b/public/js/client.js @@ -15,7 +15,7 @@ * @license For commercial use or closed source, contact us at license.mirotalk@gmail.com or purchase directly from CodeCanyon * @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661 * @author Miroslav Pejic - miroslav.pejic.85@gmail.com - * @version 1.3.31 + * @version 1.3.32 * */