mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-11-22 04:33:16 +03:00
Merge branch 'master' of https://github.com/Ylianst/MeshCentral
This commit is contained in:
commit
2dfbfc5aaf
39
.github/workflows/docker.yml
vendored
Normal file
39
.github/workflows/docker.yml
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
name: Docker
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
jobs:
|
||||
build:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.MY_TOKEN }}
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: docker/Dockerfile
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -16,6 +16,8 @@ jobs:
|
||||
- name: Release
|
||||
uses: justincy/github-action-npm-release@2.0.2
|
||||
id: release
|
||||
with:
|
||||
token: ${{ secrets.MY_TOKEN }}
|
||||
- name: Print release output
|
||||
if: ${{ steps.release.outputs.released == 'true' }}
|
||||
run: echo Release ID ${{ steps.release.outputs.release_id }}
|
||||
|
@ -26,14 +26,16 @@ RUN if ! [ -z "$DISABLE_TRANSLATE" ] && [ "$DISABLE_TRANSLATE" != "yes" ] && [ "
|
||||
echo -e "\e[0;31;49mInvalid value for build argument DISABLE_TRANSLATE, possible values: yes/true\e[;0m"; exit 1; \
|
||||
fi
|
||||
|
||||
# first try throws Error: Cannot find module 'jsdom'
|
||||
RUN if [ -z "$DISABLE_MINIFY" ] || [ -z "$DISABLE_TRANSLATE" ]; then cd meshcentral/translate && node translate.js extractall; exit 0; fi
|
||||
# install translate/minify modules if need too
|
||||
RUN if [ -z "$DISABLE_MINIFY" ] || [ -z "$DISABLE_TRANSLATE" ]; then cd meshcentral && npm install html-minifier jsdom minify-js; fi
|
||||
|
||||
# first extractall if need too
|
||||
RUN if [ -z "$DISABLE_MINIFY" ] || [ -z "$DISABLE_TRANSLATE" ]; then cd meshcentral/translate && node translate.js extractall; fi
|
||||
|
||||
# minify files
|
||||
RUN if [ -z "$DISABLE_MINIFY" ]; then cd meshcentral/translate && node translate.js minifyall; fi
|
||||
|
||||
# translate
|
||||
RUN if [ -z "$DISABLE_TRANSLATE" ]; then cd meshcentral/translate && node translate.js extractall; fi
|
||||
RUN if [ -z "$DISABLE_TRANSLATE" ]; then cd meshcentral/translate && node translate.js translateall; fi
|
||||
|
||||
|
||||
@ -56,11 +58,8 @@ COPY --from=builder /opt/meshcentral/meshcentral/docker/config.json.template /op
|
||||
RUN rm -rf /opt/meshcentral/meshcentral/docker
|
||||
RUN rm -rf /opt/meshcentral/meshcentral/node_modules
|
||||
|
||||
# install dependencies from package.json
|
||||
RUN cd meshcentral && npm install
|
||||
|
||||
# install dependencies for plugins
|
||||
RUN cd meshcentral && npm install nedb
|
||||
# install dependencies from package.json and nedb
|
||||
RUN cd meshcentral && npm install && npm install nedb
|
||||
|
||||
EXPOSE 80 443 4433
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user