feat(users/Profpatsch/whatcd-resolver): add services & readme
Gives a story for running both jaeger and the reverse proxy, and the program proper. `postgres` is still run from the client. Adds a little readme. Change-Id: I11185028541c0214e152fd76c9c72b7e2eb11122 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11171 Tested-by: BuildkiteCI Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de>
This commit is contained in:
parent
8ca42dc0cd
commit
efa5fe1239
7 changed files with 61 additions and 1 deletions
21
users/Profpatsch/whatcd-resolver/README.md
Normal file
21
users/Profpatsch/whatcd-resolver/README.md
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# whatcd-resolver
|
||||
|
||||
To run:
|
||||
|
||||
```
|
||||
ninja run-services
|
||||
```
|
||||
|
||||
in one terminal (starts the background tasks)
|
||||
|
||||
```
|
||||
ninja run
|
||||
```
|
||||
|
||||
to start the server. It runs on `9092`.
|
||||
|
||||
You need to be in the `nix-shell` in `./..`.
|
||||
|
||||
You need to set the `pass` key `internet/redacted/api-keys/whatcd-resolver` to an API key for RED.
|
||||
|
||||
You need to have a transmission-rpc-daemon listening on port `9091` (no auth, try ssh port forwarding lol).
|
||||
20
users/Profpatsch/whatcd-resolver/build.ninja
Normal file
20
users/Profpatsch/whatcd-resolver/build.ninja
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
builddir = .ninja
|
||||
|
||||
outdir = ./output
|
||||
|
||||
rule run-services
|
||||
command = s6-svscan ./services
|
||||
|
||||
rule run
|
||||
command = execlineb -c '$
|
||||
importas -i DEPOT_ROOT DEPOT_ROOT $
|
||||
importas -i PROFPATSCH_ROOT PROFPATSCH_ROOT cd $$PROFPATSCH_ROOT $
|
||||
nix-run { $$DEPOT_ROOT -A users.Profpatsch.shortcuttable } cabal repl whatcd-resolver/ --repl-options "-e main" $
|
||||
'
|
||||
|
||||
build run-services: run-services
|
||||
pool = console
|
||||
|
||||
build run: run
|
||||
pool = console
|
||||
3
users/Profpatsch/whatcd-resolver/services/.gitignore
vendored
Normal file
3
users/Profpatsch/whatcd-resolver/services/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
/.s6-svscan/
|
||||
/**/event/
|
||||
/**/supervise/
|
||||
3
users/Profpatsch/whatcd-resolver/services/jaeger/run
Executable file
3
users/Profpatsch/whatcd-resolver/services/jaeger/run
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env execlineb
|
||||
importas -i DEPOT_ROOT DEPOT_ROOT
|
||||
nix-run { $DEPOT_ROOT -A users.Profpatsch.jaeger -kK --builders '' }
|
||||
2
users/Profpatsch/whatcd-resolver/services/reverse-proxy/run
Executable file
2
users/Profpatsch/whatcd-resolver/services/reverse-proxy/run
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env execlineb
|
||||
caddy reverse-proxy --from :9092 --to :9093
|
||||
Loading…
Add table
Add a link
Reference in a new issue