{"id":29170282,"url":"https://github.com/mendixlabs/mendix-for-balena","last_synced_at":"2025-10-10T03:35:18.561Z","repository":{"id":78879217,"uuid":"171148891","full_name":"mendixlabs/mendix-for-balena","owner":"mendixlabs","description":"Mendix Buildpack for Balena","archived":false,"fork":false,"pushed_at":"2019-12-10T23:05:24.000Z","size":2185,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-01T12:53:54.036Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mendixlabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-02-17T17:11:36.000Z","updated_at":"2022-02-17T16:31:10.000Z","dependencies_parsed_at":"2023-07-05T03:49:11.266Z","dependency_job_id":null,"html_url":"https://github.com/mendixlabs/mendix-for-balena","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mendixlabs/mendix-for-balena","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendixlabs%2Fmendix-for-balena","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendixlabs%2Fmendix-for-balena/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendixlabs%2Fmendix-for-balena/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendixlabs%2Fmendix-for-balena/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mendixlabs","download_url":"https://codeload.github.com/mendixlabs/mendix-for-balena/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendixlabs%2Fmendix-for-balena/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002623,"owners_count":26083425,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-01T12:39:39.505Z","updated_at":"2025-10-10T03:35:18.537Z","avatar_url":"https://github.com/mendixlabs.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"Mendix for Raspberry Pi - Balena Buildpack\n===\n\n**Version: 0.1.0**\n\n## Disclaimer\n\n**Note: This is work in progress and should not be used for any production setup. This README is not finished yet. See TODO (bottom of this README) for all steps that are still in development. We do not take responsibility if your Raspberry Pi decides to take over the world.**\n\n\u003e This is not supported by [Mendix](https://www.mendix.com/), purely a proof-of-concept created by two Mendix developers.\n\n## Description\n\nThe Mendix Balena Buildpack allows you to run a Mendix application on a Raspberry Pi 3. We do this by forking the official Mendix build pack so that it will run on ARM and combining this with a ready-to-go configuration of NGINX \u0026 PostgreSQL in separate containers on the Raspberry Pi.\n\nThis modified buildpack also contains WiringPi ([version 2.46.1](http://wiringpi.com/wiringpi-updated-for-the-pi-v3plus/), included) \u0026 Pi4J ([version 1.2-SNAPSHOT](http://pi4j.com/download.html), included), so we can control GPIO ports from Java Actions in Mendix. The separate module can be found [here](https://github.com/JelteMX/RaspberryPiModule)\n\nIt is based on the following sources:\n\n- [Mendix Buildpack for Docker](https://github.com/MXClyde/docker-mendix-buildpack/tree/pi) - this is the forked Mendix Docker buildpack made to run on ARM\n- [Mendix Buildpack for Cloud Foundry](https://github.com/MXClyde/cf-mendix-buildpack/tree/pi) - this is modified and will be downloaded as part of the Docker buildpack flow.\n- [Balena Raspberry Pi3 Ubuntu base image with OpenJDK](https://hub.docker.com/r/balenalib/raspberrypi3-ubuntu-openjdk/)\n\n## Instructions\n\n1. Create an account on Balena.io, create an application for Raspberry Pi 3 and burn the image on an SD. Have a look at [the How-to](https://www.balena.io/docs/learn/getting-started/raspberrypi3/nodejs/#create-an-application) describing setting this up for NodeJS. Follow the steps up to (and included) [Provision device](https://www.balena.io/docs/learn/getting-started/raspberrypi3/nodejs/#provision-your-device). From there on out, we will follow the steps that are described below.\n2. Clone this repository from Github to your computer\n3. Add the balena remote to this respository: `git remote add balena \u003cusername\u003e@git.balena-cloud.com:\u003cusername\u003e/\u003crepo\u003e.git`. You can find this command in the top right of your Balena dashboard in an app.\n4. Create a deployment package for your application in Mendix Modeler.\n5. Take the .MDA file and unzip it in the project folder in `docker-mendix-buildpack/project`. Your project folder should contain two folders: `web` \u0026 `model`.\n6. Now copy the `web` folder to the nginx folder in this buildpack. This is needed to serve static files.\n\nYour repository should have the following (partial) structure (**_leave all other folder and files AS IS_**):\n\n```\n├── docker-compose.yml\n├── docker-mendix-buildpack\n│   └── project\n│       ├── web \u003cweb-folder from deployment\u003e\n│       └── model \u003cmodel-folder from deployment\u003e\n└── nginx\n    └── web \u003cweb-folder from deployment\u003e\n```\n\n7. Make changes to the Docker compose file, adding a License ID \u0026 Key (if necessary), your admin password, maybe a remote database. **Note: You can also put these as ENVIRONMENT variables in your Balena configuration (which is preferable instead of putting this in the configuration files itself). See [Environment and service variables on Balena.io](https://www.balena.io/docs/learn/manage/serv-vars/)**\n7. Now add everything to a commit: `git add --all :/` and `git commit -m \"Commit message\"`\n8. Push it to Balena: `git push balena master`\n9. See the magic happening\n\n## Local development\n\n`This section is not finished yet`\n\nIt is possible, using the Balena Cli, to build the Docker images locally. This will fix problems with the build server ARM1, which sometimes fails. Images are stored in your local Docker repo (on your computer). We're also checking if it will be possible to put this image on Docker Hub to make development easier.\n\n### Build\n\n1. Make sure Docker is running on your computer\n2. Make sure Balena Cli is installed on your computer and you are logged in.\n3. Run the following command: `balena build --deviceType raspberrypi3 --arch armv7hf --emulated --verbose --logs`\n4. This will build all the images and store them in your local Docker\n\n### Deploy\n\n1. Make sure the build in the previous step is succesful\n2. Deploy to Balena with the following command: `balena deploy \u003cusername\u003e/\u003capp-name\u003e`\n\nSee for further instructions _*[Balena Cli Docs](https://www.balena.io/docs/reference/cli/)*_\n\n## CI/CD\n\n*_CONCEPT: not ready yet_*\n\nThis isn't finished yet, but the authors were able to create a CI/CD pipeline in Azure Devops, so you can just commit to the Teamserver in Mendix and it will automatically deploy to Balena. This will be updated once we have finished up the writeup for this. Right now this is using undocumented tools to download a deployment package, for which it is unable to be documented yet.\n\n## TODO\n\nThis project is a proof of concept. The following things are on the todo list:\n\n- Use the MDA file instead of the unzipped contents\n- ~Check if we need the web folder (static content) in the mendix buildpack, or only in NGINX~ Web folder is needed\n- Finish up the RPI Module for Mendix which can be found here: [https://github.com/JelteMX/RaspberryPiModule](https://github.com/JelteMX/RaspberryPiModule)\n- `docker-compose.yml` includes a reference to a container for Google Cloud IOT, which is a way to send data to Google Cloud IOT. This component needs further development before it can be reliably used.\n- We will update the Dockerfile in the Mendix buildpack to become a `Dockerfile.template`, making it possible to run it on other devices as well.\n- See if we can host the specific Mendix image on Docker Hub, so we don't have to include the current complex Dockerfile setup\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmendixlabs%2Fmendix-for-balena","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmendixlabs%2Fmendix-for-balena","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmendixlabs%2Fmendix-for-balena/lists"}