My dotfiles
Dynamically supervise a GRPC connection and keep it alive for a while, using a timeout to kill the process on inactivity. The Connection GenServer keeps the connection alive, while listening to a health stream from the GRPC endpoint, notifying any subscribed listeners about changes to health. This health is then propagated to the main servers page. Also create a looping get_sys_info which retrieves some basic system information. |
||
|---|---|---|
| .woodpecker | ||
| agent | ||
| app | ||
| proto | ||
| proto_compiler | ||
| .gitignore | ||
| .tool-versions | ||
| Cargo.lock | ||
| Cargo.toml | ||
| docker-compose.yml | ||
| get_prymn.sh | ||
| README.md | ||
Prymn
Project dependencies
- Elixir 1.15
- Erlang 24 or later
- Rust (recent version)
- protoc for protobufs version 3
Setup
Some basic steps to setup the project and its dependencies.
- Install asdf (curl is also required)
- Using git:
git clone https://github.com/asdf-vm/asdf.git ~/.asdf - or, using paru,
paru -S asdf-vm - Add asdf to path:
source /opt/asdf-vm/asdf.{bash,zsh,fish}, or~/.asdf/asdf.{bash,zsh,fish}
- Using git:
- Install erlang
asdf plugin add erlangasdf install erlang 25
- Install elixir
asdf plugin add elixirasdf install elixir 1.15
- Install rust
- Optionally, set
CARGO_HOMEandRUSTUP_HOMEto a XDG directory (e.g~/.local/share/cargoand~/.local/share/rustup) - Arch:
pacman -S rustup - Other:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh - Make sure to add
$HOME/.cargo/bin(or$CARGO_HOME) toPATH rustup toolchain install stablerustup default stablerustup component add clippyrustup component add rust-analyzerrustup component add rustfmt
- Optionally, set
- Install protoc version 3
- Arch:
pacman -S protobuf - Debian:
apt install -y protobuf-compiler
- Arch:
- (Optional) Install inotify-tools
- Arch:
pacman -S inotify-tools - Debian:
apt install -y inotify-tools
- Arch:
- Setup elixir
- Install hex:
mix local.hex cd app && mix escript.install hex protobufasdf reshim
- Install hex:
Preparing for development
Elixir app
cd app- Start the database:
docker-compose up -d mix setupmix phx.server