https://github.com/thiskevinwang/waypoint-plugin-nixpacks
A HashiCorp Waypoint plugin to build images using railwayapp/nixpacks
https://github.com/thiskevinwang/waypoint-plugin-nixpacks
docker hashicorp nixpacks oci-image waypoint
Last synced: 9 months ago
JSON representation
A HashiCorp Waypoint plugin to build images using railwayapp/nixpacks
- Host: GitHub
- URL: https://github.com/thiskevinwang/waypoint-plugin-nixpacks
- Owner: thiskevinwang
- Created: 2023-02-10T12:00:44.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-23T04:35:08.000Z (over 3 years ago)
- Last Synced: 2025-09-04T18:51:15.486Z (11 months ago)
- Topics: docker, hashicorp, nixpacks, oci-image, waypoint
- Language: Go
- Homepage:
- Size: 44.1 MB
- Stars: 12
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

---
# waypoint-plugin-nixpacks
This [Waypoint][waypoint] plugin builds OCI images using [`nixpacks`][nixpacks].
This plugin only implements the [builder][builder] interface.
## Building
To build this plugin, run `make`. (See [`Makefile`](./Makefile) for more details.)
A plugin binary will be built and outputted to the [`./bin`](./bin) folder as well as copied into the example project folder.
This requires the following packages:
- `go`
- `protoc`
- `protoc-gen-go`
## Usage
The Waypoint runner (such as the CLI) that ends up picking up a job (such as `waypoint build`) will need [`nixpacks`][nixpacks] installed.
Check out the [examples](./examples) folder for usage examples.
Also check out [waypoint.yml](./examples/node-express/.github/workflows/waypoint.yml) for very _rough idea_ of how to use Waypoint, and _this plugin_ w/ GitHub actions.
- This workflow uses a GitHub runner to connect to a Waypoint server on HCP, build `waypoint-plugin-nixpacks`, build the example app, and publish the resulting Docker image to DockerHub.
[builder]: https://developer.hashicorp.com/waypoint/docs/extending-waypoint/plugin-interfaces/builder
[waypoint]: https://github.com/hashicorp/waypoint
[nixpacks]: https://github.com/railwayapp/nixpacks
### Note on `nixpacks`
The machine (or runner) that executes this plugin will require `nixpacks` to be installed. Here are 2 different scenarios to help explain this.
### `waypoint up -local=true`
In this scenario, the `waypoint` CLI will serve as the **runner**, and maybe it is connecting out to the **server** running on HCP.
In this scenario the host machine executing `waypoint up -local=true` will also need `nixpacks` installed for the plugin to function correctly. This may already be the case if you're like me and doing development and testing from the same machine.
### `waypoint up -local=false`
In this scenario, the `waypoint` CLI only queues up jobs and a remote **runner** will be hosted elsewhere. That runner could be running on various platforms, such as:
- Directly on EC2, via
```bash
waypoint runner agent
```
- As `docker` container, via
```
waypoint runner install \
-platform=docker \
-server-addr=api.hashicorp.cloud:443 \
-docker-runner-image=hashicorp/waypoint
```
In the EC2 option, the EC2 instance itself will need `nixpacks` installed.
In the Docker option, the `-docker-runner-image` will need `nixpacks` installed.