This repository contains a sample pipeline to showcase how rudra can be used in practice.
The configuration file for this pipeline can be found under ./.github/workflows/test.yml
.
Openapi files are automatically generated using a tool called swag
(see here for more information).
These files can be found under the ./docs
directory or under http://localhost:8080/openapi/index.html
when starting the service.
Install nix onto your system
curl -L https://nixos.org/nix/install | sh
Enable flakes by adding the following line to ~/.config/nix/nix.conf
or /etc/nix/nix.conf
(preferably the first).
experimental-features = nix-command flakes
Enable flakes by adding the following options to your nix.conf
{ pkgs, ... }: {
nix = {
package = pkgs.nixFlakes;
extraOptions = ''
experimental-features = nix-command flakes
'';
};
}
To start rudra-example localy simply run:
nix run
To start rudra-example in a docker container run:
docker build -t rudra-example .
docker run -d -rm --name app rudra-example
This example uses swag
to automatically generate its openapi files.
To update these run:
nix develop
./swag i
The flake configuration file contains a vendoSha256, that has to be updated every time the dependencies change.
After updating the go dependencies simply run nix build
and copy over the hash from the error message that occurs.