tailscale start daemon
This commit is contained in:
@@ -29,13 +29,9 @@ services:
|
||||
- dokploy-network
|
||||
command:
|
||||
[
|
||||
"node",
|
||||
"dist/index.js",
|
||||
"gateway",
|
||||
"--bind",
|
||||
"${OPENCLAW_GATEWAY_BIND:-loopback}",
|
||||
"--port",
|
||||
"18789",
|
||||
"/bin/sh",
|
||||
"-c",
|
||||
"/home/node/.local/bin/tailscale-start.sh && node dist/index.js gateway --bind ${OPENCLAW_GATEWAY_BIND:-loopback} --port 18789",
|
||||
]
|
||||
# healthcheck:
|
||||
# test: ["CMD", "healthcheck.sh"]
|
||||
|
||||
@@ -33,6 +33,19 @@ RUN GOG_VERSION=$(curl -s https://api.github.com/repos/steipete/gogcli/releases/
|
||||
# Install Tailscale
|
||||
RUN curl -fsSL https://tailscale.com/install.sh | HEADLESS=true sh
|
||||
|
||||
# Create tailscale directories
|
||||
RUN mkdir -p /var/run/tailscale /home/node/.local/share/tailscale /home/node/.local/share/tailscale/files /home/node/.local/bin && \
|
||||
chmod 777 /var/run/tailscale && \
|
||||
chown -R node:node /home/node/.local
|
||||
|
||||
# Create tailscale startup script (runs as node user)
|
||||
RUN echo '#!/bin/sh' > /home/node/.local/bin/tailscale-start.sh && \
|
||||
echo 'mkdir -p /var/run/tailscale /home/node/.local/share/tailscale /home/node/.local/share/tailscale/files' >> /home/node/.local/bin/tailscale-start.sh && \
|
||||
echo 'tailscaled --socket=/tmp/tailscale.sock --tun=userspace-networking &' >> /home/node/.local/bin/tailscale-start.sh && \
|
||||
echo 'sleep 3' >> /home/node/.local/bin/tailscale-start.sh && \
|
||||
echo 'tailscale --socket=/tmp/tailscale.sock up --authkey=$TAILSCALE_AUTH_KEY' >> /home/node/.local/bin/tailscale-start.sh && \
|
||||
chmod +x /home/node/.local/bin/tailscale-start.sh
|
||||
|
||||
# Copy custom tools into the image
|
||||
COPY tools/* /usr/local/bin/
|
||||
COPY bin/* /usr/local/bin/
|
||||
|
||||
Reference in New Issue
Block a user