Auto-build Win/Linux/macOS meteor app + push to Docker

I’ve been working on a Meteor app (Tdarr) for a few months and the update process has become quite tiring as I have to do it all manually. I’m looking for ways to automate the following process:

  • Build Win/Linux/macOS packages and add to Github release.
  • Build 2 Docker containers and push to Docker.

From my understanding, the Win/Linux/macOS packages have to be built on their respective operating systems as if they are built on another operating system then the wrong dependancies will be installed by npm.

I’ve tested using Github actions but the build process takes so long due to 40,000 or so files per package.

Anyone have any suggestions/experience with this sort of workflow?

You can use Gitlab CI/CD to this. I used and worked fine.

Okay thanks I’ll have a look at that.

I’m using Jenkins and it required a bit of setup at first to get pipelines automated properly, but I suggest you try Gitlab CI/CD first.

One example:

  - build
  - deploy
  stage: build
  image: stieneee/docker-in-ubuntu:latest
    - docker:dind
    - curl -sL | bash -
    - apt-get update
    - apt-get install -y nodejs build-essential git
    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN
    - curl | sh
    - mkdir -p /tmp/meteor-build/
    - npm i
    - meteor build --allow-superuser --directory /tmp/meteor-build/
    - cp Dockerfile /tmp/meteor-build/bundle/
    - cd /tmp/meteor-build/bundle/
    - docker build -t$CI_PIPELINE_ID .
    - docker push$CI_PIPELINE_ID
    - docker tag$CI_PIPELINE_ID
    - docker push

You need to create a .gitlab-ci.yml at root of your project.

This process build Meteor app, create a Docker Image and push it at Gitlab Registry.

1 Like