apolopena / gitpod-laravel-starter

Configurable LAMP or LEMP stack starter project powered by Laravel and Gitpod. Supports Laravel 6, 7, and 8. Out of the box support for React, Vue, and Bootstrap frontends, with or without built-in auth .
https://github.com/apolopena/gitpod-laravel-starter/wiki
MIT License
40 stars 44 forks source link

Option to use the tailscale integration #166

Open strausmann opened 2 years ago

strausmann commented 2 years ago

Problem this feature will solve

With the Tailscale integration you can use e.g. services / databases in other environments in your GitPod development environment.

Background

Proposed Solution

GitPod has a sample project for the tailscale integration. https://github.com/gitpod-io/template-tailscale

If the GitPod ENV "TAILSCALE_AUTHKEY" is present and the Tailscale integration has been enabled in the starter.ini, the Tailscale service shall be started in the background and the AuthKey shall be used to log into the TailNet.

Here the GitPod Blog Post: https://www.gitpod.io/blog/tailscale

apolopena commented 2 years ago

At the time of writing this, the tailscale and tailscald binaries are very new and require sudo to run. Also running: tailscale --help outputs this: This CLI is still under active development. Commands and flags will change in the future.

Until Gitpods tailscale commands will not change (the API is solid and not so expiremental) a user that wants to implement tailscale can do so manually by setting a value for the TAILSCALE_AUTHKEY environment variable in the Gitpod dashboard and then running the following command in the terminal after a workspace is created:

      sudo -E tailscale up --hostname "gitpod-${GITPOD_WORKSPACE_ID}"  --authkey "${TAILSCALE_AUTHKEY}"

Also as a side note it is not advised to run tailscale in the background as a user would not be prompted in the terminal to authenticate:

To authenticate, visit:

 https://login.tailscale.com/a/542947456ed5

Or notified in the terminal if tailscale was successfully authenticated or not.

Success.
apolopena commented 2 years ago

@strausmann is it ok with you if I keep this issue in the backlog and leave it out of the 1.4 release?

strausmann commented 2 years ago

it's ok for me... thx