Browse Source
1. Commit: @0f8b1cbd3b changed `Commands` to `Command` in `server.go`, specifically Line 223. This broke the `list.html` range template. Small change to fix that. > Line 223 (server.go): `ctx.Set("Command", cmd)` 2. The dockerfile itself, just swapped `github.com` references to `git.mills.io` in order for it to actually build on my system.. and it's no longer on Github ;). 3. Added a simple update to the `base.html` to add a link directly to `list`, for the lazy who like to click vice type it in. Small QoL update.  4. Added a button for each bookmark to have a red **X** to do a simple remove from the `list.html` page instead of looking at what you want to remove and then address bar typing it or going back. Small QoL fix.  5. I've changed the docker `start.sh` script to actually use **environment** variables. This will enable the environment syntax (instead of using **command**) in compose files such as: ### New ```yaml environment: - BIND=0.0.0.0:8000 - BASEURL=http://golinks.mydomain.net # BASEURL is extremely convenient when proxying it ``` ### Old ```yaml command: - bind=0.0.0.0:8000 - fqdn=http://golinks.mydomain.net ``` This also prevents from passing something unexpected to golinks. 6. Lastly! Can you push an updated docker image to Docker Hub? The one on DockerHub is golinks 0.0.5 and the version (before this pull request) is 0.0.7. Co-authored-by: brokenscripts <brokenscripts@protonmail.com> Reviewed-on: #52 Co-authored-by: brokenscripts <brokenscripts@noreply@mills.io> Co-committed-by: brokenscripts <brokenscripts@noreply@mills.io>master
4 changed files with 32 additions and 9 deletions
@ -1,5 +1,25 @@
|
||||
#!/bin/sh |
||||
BIND="${BIND:-0.0.0.0:8000}" |
||||
BASEURL="${BASEURL:-http://localhost:8000}" |
||||
DBPATH="${DBPATH:-/search.db}" |
||||
TITLE="${TITLE:-Search}" |
||||
SEARCHURL="${SEARCHURL:-https://www.google.com/search?q=%s&btnK}" |
||||
SUGGESTURL="${SUGGESTURL:-https://suggestqueries.google.com/complete/search?client=firefox&q=%s}" |
||||
CONFIG="${CONFIG-}" |
||||
|
||||
PORT="${PORT:-8000}" |
||||
|
||||
exec golinks -bind=0.0.0.0:"$PORT" "$@" |
||||
if [ ! -z "$CONFIG" ] |
||||
then |
||||
echo "Executing golinks with a provided config file:" |
||||
echo " -config=$CONFIG" |
||||
exec golinks -config "$CONFIG" |
||||
else |
||||
echo "Executing golinks with the following parameters:" |
||||
echo " -bind=$BIND" |
||||
echo " -baseURL=$BASEURL" |
||||
echo " -dbpath=$DBPATH" |
||||
echo " -title=$TITLE" |
||||
echo " -searchURL=$SEARCHURL" |
||||
echo " -suggestURL=$SUGGESTURL" |
||||
exec golinks -bind="$BIND" -baseURL="$BASEURL" -dbpath="$DBPATH" -title="$TITLE" -searchURL="$SEARCHURL" -suggestURL |
||||
="$SUGGESTURL" |
||||
fi |
||||
|
Loading…
Reference in new issue