diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..057776c --- /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/bro:latest \ No newline at end of file diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..26f5c15 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +.github diff --git a/Dockerfile b/Dockerfile index 804bce2..485c95f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,24 @@ -FROM node:18-alpine +# Use a lightweight Node.js image +FROM node:20-alpine +# Set working directory WORKDIR /src +# 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 3016:3016 - -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/server.js b/app/server.js index 9d34bc9..205e58a 100644 --- a/app/server.js +++ b/app/server.js @@ -8,7 +8,7 @@ * @license For open source under AGPL-3.0 * @license For private project or commercial purposes contact us at: license.mirotalk@gmail.com * @author Miroslav Pejic - miroslav.pejic.85@gmail.com - * @version 1.0.49 + * @version 1.0.50 */ require('dotenv').config(); diff --git a/package.json b/package.json index 1b14446..9f064d8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mirotalkbro", - "version": "1.0.49", + "version": "1.0.50", "description": "P2P WebRTC audio, video and screen live broadcast", "main": "app/server.js", "scripts": { @@ -23,8 +23,8 @@ "author": "Miroslav Pejic", "license": "AGPLv3", "dependencies": { - "@sentry/integrations": "^7.113.0", - "@sentry/node": "^7.113.0", + "@sentry/integrations": "^7.114.0", + "@sentry/node": "^7.114.0", "compression": "^1.7.4", "cors": "^2.8.5", "dotenv": "^16.4.5",