aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLia Lenckowski <lialenck@protonmail.com>2023-08-23 19:16:29 +0200
committerLia Lenckowski <lialenck@protonmail.com>2023-08-23 19:16:29 +0200
commit33bc8bfb247f4fcbfc206bdeb9c0e118e961ba59 (patch)
tree498bf05cd0c1ea0d65f314e6f56877cd2fb9c4a4
parent1e52fa4df63352835ea3020c727ea6093779e176 (diff)
downloadfastbangs-33bc8bfb247f4fcbfc206bdeb9c0e118e961ba59.tar
fastbangs-33bc8bfb247f4fcbfc206bdeb9c0e118e961ba59.tar.bz2
fastbangs-33bc8bfb247f4fcbfc206bdeb9c0e118e961ba59.tar.zst
document config file; small fixes in default config & build system
-rw-r--r--README.md4
-rw-r--r--fastbangs.yaml9
-rw-r--r--makefile2
3 files changed, 9 insertions, 6 deletions
diff --git a/README.md b/README.md
index 4047bf0..9e98f7a 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,9 @@ The server keeps its own list of bangs, initialized with those from duckduckgo.
There is a public instance running at [search.metamuffin.org](https://search.metamuffin.org), running on a server in germany.
## Configuration
-Configuration is done through environment variables. The following may be used:
+Configuration is done through environment variables, or a file named "fastbangs.yaml" sitting in the working directory of the server. Running `make` will include a default config.
+
+If you go with environment variables, the following options are available:
- PORT: port to bind to. Default: 20546
- BIND\_ADDR: address to bind to. Default: any ipv4/ipv6 interface
- BASE\_URL: url of the deployed website, without trailing slash. Default: "http://localhost:20546"
diff --git a/fastbangs.yaml b/fastbangs.yaml
index 1c2720b..0151744 100644
--- a/fastbangs.yaml
+++ b/fastbangs.yaml
@@ -4,14 +4,15 @@
# port to bind to
port: "20546"
# address to bind to. can be a concrete address like 127.0.0.1, or *6 to indicate any ipv4/ipv6 address
-bind-addr: "*4"
+bind-addr: "*6"
# information used for the search description
-# the base-url MUSTN'T include a trailing slash
-base-url: http://localhost:5035
+# the base-url MUSTN'T include a trailing slash,
+# and the favicon-url should lead to a 16x16 image/x-icon file
+base-url: http://localhost:20546
favicon-url: http://69owo.de/favicon.ico
# access to the UI for accepting/rejecting user-submitted bangs.
# for help with the admin-pw-hash please read the README.md
-admin-user: bleh
+admin-user: bleb
admin-pw-hash: ""
diff --git a/makefile b/makefile
index 399eb73..12be4bd 100644
--- a/makefile
+++ b/makefile
@@ -23,7 +23,7 @@ deploy:
deploy/index.html: frontend/index.html
cp $< $@
deploy/fastbangs.yaml: fastbangs.yaml
- cp $< $@
+ cp --no-clobber $< $@; true
deploy/fastbangs: $(shell find src -name '*.hs')
stack install --local-bin-path deploy
deploy/bundle.js: $(shell find frontend -name '*.ts') frontend/fuzzysort.js