Add "User" to the expansion environment for links. The intent here it
support personalized go links such as:
go/mycal => https://calendar.google.com/calendar/embed?src={{.User}}
That's not a terribly interesting example, but there are others I intend
to use internally.
Signed-off-by: Will Norris <will@tailscale.com>
PR #12 changes directory used by Docker image. This commit updates the fly.io
instructions to use the same directory.
Signed-off-by: Gabriel Wong <gabriel@bifrost.ai>
* Add Flake file (Nix package, NixOS module)
This commit adds a Flake.nix file allowing Nix users to consume this
repo with `nix build`, `nix run` and adds a NixOS module to quickly spin
up the service.
* add github action file for nix build
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
Co-authored-by: Xe Iaso <me@xeiaso.net>
Use a build image built for the native architecture so that it doesn't
run in emulation mode.
Switch to Chainguard's wolfi/glibc build image. This limits our build
architectures to just amd64 and arm64, but that is sufficient for our
needs.
Updates #42
Updates #43
Signed-off-by: Will Norris <will@tailscale.com>
Currently, the special "tagged-devices" user (which exists for any
tagged devices in the tailnet) can own go links. This change permits
tagged devices to continue to create go links, but skips over them for
ownership checks, allowing any human user can take over ownership.
Fixes#37
Signed-off-by: Will Norris <will@tailscale.com>
When loading stats from the database, map IDs back to their canonical
short name, which is what we want to show in the frontend. This is only
called once on cold start, so performance of loading all links isn't a
big concern.
Fixes#13
Signed-off-by: Will Norris <will@tailscale.com>
Build docker images for amd64, arm64, and arm/v7. Also several other
small improvements to docker workflow like documenting which actions we
run on, setting concurrency settings, and reversing the logic for when
we push new images live (specifically looking for a push event rather
than a "not pull request" event, in case we add other events later).
Fixes#26
Specify a command line argument to resolve a link locally and exit.
Also add a new flag, -resolve-from-backup, which loads a snapshot into
an in-memory database and resolves the specified link.
go/.export doesn't include click data anymore since we switched over to
sqlite. Remove that code as well as the Link.Clicks field. Remove old
/_/export redirect, since we've long since moved off of using it.
We still support directly setting LastSnapshot to support embedding the
snapshot in the binary (like we do internally). But this allows an
alternate way have restoring backups which doesn't require recompiling
binaries.
Even though we have our own build and deploy scripts, most users will be
more comfortable with a standard Dockerfile. We could publish our
scripts later if warranted. For now, we'll just keep them in corp.
Go 1.19 rejects relative paths in $PATH (https://go.dev/cl/403274),
so resolve the tool/ path before adding it.
Updates tailscale/tailscale#5210
Change-Id: I891dd2739fe18534e0facb4dbbaaf6a98b91aeb1