mirror of
https://github.com/backnotprop/plannotator.git
synced 2026-09-14 14:17:26 +08:00
3391d071a4
* Add SSH remote session support with fixed port - Auto-detect SSH sessions via SSH_TTY/SSH_CONNECTION env vars - Use fixed port 19432 over SSH for predictable port forwarding - Add PLANNOTATOR_PORT env var for custom port configuration - Add retry loop (5 attempts) for port conflicts - Print SSH config hint when running remotely - Skip browser auto-open in SSH sessions * integration test for ssh --------- Co-authored-by: Michael Ramos <mdramos8@gmail.com>
38 lines
773 B
Docker
38 lines
773 B
Docker
# Test Dockerfile for SSH remote support
|
|
FROM ubuntu:24.04
|
|
|
|
# Install dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
curl \
|
|
unzip \
|
|
openssh-server \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Bun
|
|
RUN curl -fsSL https://bun.sh/install | bash
|
|
ENV PATH="/root/.bun/bin:$PATH"
|
|
|
|
# Set up SSH
|
|
RUN mkdir -p /var/run/sshd && \
|
|
echo 'root:testpass' | chpasswd && \
|
|
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
|
|
|
|
# Copy project
|
|
WORKDIR /app
|
|
COPY package.json bun.lock ./
|
|
COPY apps ./apps
|
|
COPY packages ./packages
|
|
COPY tests/manual/ssh/test-ssh.sh ./
|
|
|
|
# Install dependencies
|
|
RUN bun install
|
|
|
|
# Build the hook
|
|
RUN bun run build:hook
|
|
|
|
# Expose SSH port
|
|
EXPOSE 22
|
|
|
|
# Start SSH server
|
|
CMD ["/usr/sbin/sshd", "-D"]
|