Skip to content

Commit

Permalink
[mirotalkc2c] - add workflows build
Browse files Browse the repository at this point in the history
  • Loading branch information
miroslavpejic85 committed May 11, 2024
1 parent adfe3c0 commit 7366acc
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 16 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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/c2c:latest
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.github
28 changes: 15 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
FROM node:18-alpine
# 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 ./.env
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 frontend frontend
COPY backend backend

EXPOSE 8080/tcp

CMD npm start
# Set default command to start the application
CMD ["npm", "start"]
2 changes: 1 addition & 1 deletion backend/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @license For private project or commercial purposes contact us at: [email protected] or purchase it directly via Code Canyon:
* @license https://codecanyon.net/item/mirotalk-c2c-webrtc-real-time-cam-2-cam-video-conferences-and-screen-sharing/43383005
* @author Miroslav Pejic - [email protected]
* @version 1.1.18
* @version 1.1.19
*/

require('dotenv').config();
Expand Down
2 changes: 1 addition & 1 deletion frontend/js/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @license For private project or commercial purposes contact us at: [email protected] or purchase it directly via Code Canyon:
* @license https://codecanyon.net/item/mirotalk-c2c-webrtc-real-time-cam-2-cam-video-conferences-and-screen-sharing/43383005
* @author Miroslav Pejic - [email protected]
* @version 1.1.18
* @version 1.1.19
*/

const roomId = new URLSearchParams(window.location.search).get('room');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mirotalkc2c",
"version": "1.1.18",
"version": "1.1.19",
"description": "A free WebRTC Cam-2-Cam browser-based video calls",
"main": "server.js",
"scripts": {
Expand Down

0 comments on commit 7366acc

Please sign in to comment.