# Roleypoly v4 yeah 4 of em.. ## Developing highly recommended to use nix. its actually optional, but there's caveats. **Quickstart** ```sh ## - Step one, get an environment! nix develop # or nix-shell # or direnv allow ## - Step two, setup .env cp .env.example .env # fill out .env (the file has instructions) ## - Step three, run the thing!! just # or .. maybe this.. but it may be unpredictable go run . ## - Step four, clean up the code just precommit ``` > _the caveat: using `go` alone is doable. certain things won't happen, like dependency tagging and env var loading, so.. consider `nix`.._ ### just commands - **watch** - (default) runs air livereloader - open https://localhost:8170 for live reloading, note: the console will output 8169. that works too, but doesn't reload browser on changes - **run** - runs the app with go run - **nix-run** - runs the app built via nix (slower) - **run-container** - builds the app as a docker image, then runs it. (slowest) - **fmt** - go fmt and prettier - **tidy** - fix gomods - **test** - runs normal tests - **update-vendor-hash** - updates `default.nix` vendorHash field, it won't build without it. - **precommit** - runs fmt, tidy, update-vendor-hash, and test, in that order. ## Deploying roleypoly can be deployed as a docker container (built with nix) or nix package right now. more options to come (like prebuilt binaries) ```sh nix build .#container docker load -i result docker run -it --rm -p 8169:8169 localhost/roleypoly/roleypoly ``` or like if in irl nixos ```nix #== flake.nix { inputs = { roleypoly.url = "git+https://git.sapphic.engineer/roleypoly/v4"; }; } ``` and want to use docker (its ok) ```nix #== roleypoly.nix { inputs, pkgs, ... }: { virtualisation.oci-containers.containers.roleypoly = { image = "roleypoly/roleypoly:latest"; imageFile = inputs.roleypoly.packages.${pkgs.system}.container; ports = [ "8169:8169" ]; # probably include environment and stuff too }; } ``` or use `inputs.roleypoly.packages.${pkgs.system}.roleypoly` for the actual package for like a systemd thing <33 ## thanks roleypoly has been a journey and a pleasure to make. thanks to everyone who has used it over the years. there will be no major updates after v4. _as always, with love_ _-- noe, aki, and aurelia!_