Skip to content

Conversation

atj4me
Copy link
Owner

@atj4me atj4me commented Sep 12, 2025

The Issue

Migrated from Docker Compose to a DDEV config-based approach for Tailscale router integration, removed unnecessary files, and updated Tailscale serve config for Funnel support and dynamic port handling.

How This PR Solves The Issue

  • Replaces docker-compose.tailscale-router.yaml with config.tailscale.yaml using DDEV’s config features.
  • Removes socat dependency and uses Tailscale’s built-in serve functionality.
  • Ensures persistent state and config volumes.
  • Updates tailscale-private.json and tailscale-public.json to use Funnel and dynamic DDEV_ROUTER_HTTP_PORT.
  • Cleans up obsolete files.

Manual Testing Instructions

ddev add-on get https://github.com/atj4me/ddev-tailscale-router/tarball/refs/pull/21/head
ddev restart

@atj4me atj4me requested a review from Copilot September 13, 2025 00:29
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Migrates Tailscale configuration from Docker Compose standalone service to DDEV's web container with built-in service management, removing the socat dependency and simplifying the architecture.

  • Replaces separate tailscale-router container with web container daemons using DDEV's web_extra_daemons configuration
  • Updates command wrapper to handle dynamic port forwarding and improved --public flag handling for Funnel support
  • Removes obsolete configuration files and updates tests to reflect the new architecture

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
config.tailscale-router.yaml New DDEV config file defining Tailscale daemons in web container
web-build/Dockerfile.tailscale-router Dockerfile for installing Tailscale in web container
docker-compose.tailscale-router.yaml Simplified to only add environment variables to web service
commands/host/tailscale Enhanced command wrapper with improved share/funnel handling and dynamic port support
tests/test.bats Updated tests to remove obsolete container-specific tests
install.yaml Updated project files list to reflect new architecture
tailscale-router/config/ Removed obsolete JSON configuration files
README.md Updated documentation to reflect new command options and architecture

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

atj4me and others added 3 commits September 12, 2025 20:31
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@atj4me atj4me requested a review from Copilot September 13, 2025 00:31
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
atj4me and others added 2 commits September 12, 2025 20:34
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@atj4me atj4me requested a review from Copilot September 13, 2025 01:10
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

atj4me and others added 2 commits September 12, 2025 23:34
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@atj4me atj4me requested a review from Copilot September 13, 2025 03:36
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

atj4me and others added 2 commits September 12, 2025 23:39
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@atj4me atj4me requested a review from Copilot September 13, 2025 03:39
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +2 to +10
# This Dockerfile installs Tailscale in a web container.
ARG BASE_IMAGE
FROM $BASE_IMAGE

# Install Tailscale using the official install script
RUN apt-get update && \
apt-get install -y curl && \
rm -rf /var/lib/apt/lists/* && \
curl -fsSL https://tailscale.com/install.sh | sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be simplified to:

Suggested change
# This Dockerfile installs Tailscale in a web container.
ARG BASE_IMAGE
FROM $BASE_IMAGE
# Install Tailscale using the official install script
RUN apt-get update && \
apt-get install -y curl && \
rm -rf /var/lib/apt/lists/* && \
curl -fsSL https://tailscale.com/install.sh | sh
RUN curl -fsSL https://tailscale.com/install.sh | sh

curl is already here, ARG*FROM is not needed these days.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh. I was getting a syntax error in VSCode, so I added the FROM $BASE_IMAGE and installed curl for safety. Thanks for pointing it out.

TS_USERSPACE: "true"
TS_PRIVACY: ${TS_PRIVACY:-private}
TS_SERVE_CONFIG: /config/tailscale-${TS_PRIVACY:-private}.json
- TS_AUTHKEY=${TS_AUTHKEY}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- TS_AUTHKEY=${TS_AUTHKEY}
- TS_AUTHKEY=${TS_AUTHKEY:-}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move the Tailsclae from independent container to a web daemon
2 participants