From d45cae027e55654bd056f6e7ab6f6a1c1ff8071a Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 5 Mar 2026 13:38:25 +0000 Subject: [PATCH] Add Dockerfile and railway.toml for Railway deployment Enables one-click deployment to Railway for remote code-server access from mobile devices. Uses the official install script, binds to the Railway-provided PORT, and includes a health check endpoint. https://claude.ai/code/session_01Famw4SjSWr4tECPrC6Z3ef --- Dockerfile | 39 +++++++++++++++++++++++++++++++++++++++ railway.toml | 8 ++++++++ 2 files changed, 47 insertions(+) create mode 100644 Dockerfile create mode 100644 railway.toml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..d3d1843e5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,39 @@ +FROM debian:12 + +RUN apt-get update && apt-get install -y \ + curl \ + dumb-init \ + git \ + git-lfs \ + htop \ + locales \ + man-db \ + nano \ + openssh-client \ + procps \ + sudo \ + vim-tiny \ + wget \ + zsh \ + && git lfs install \ + && rm -rf /var/lib/apt/lists/* + +# Set locale +RUN sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen && locale-gen +ENV LANG=en_US.UTF-8 + +# Install code-server +RUN curl -fsSL https://code-server.dev/install.sh | sh + +# Create coder user +RUN adduser --gecos '' --disabled-password coder \ + && echo "coder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd + +USER coder +WORKDIR /home/coder + +# Railway sets PORT; default to 8080 +ENV PORT=8080 + +# Use shell form so $PORT is expanded at runtime +ENTRYPOINT ["/bin/sh", "-c", "exec dumb-init code-server --bind-addr 0.0.0.0:${PORT}"] diff --git a/railway.toml b/railway.toml new file mode 100644 index 000000000..e16abea5a --- /dev/null +++ b/railway.toml @@ -0,0 +1,8 @@ +[build] +builder = "DOCKERFILE" +dockerfilePath = "Dockerfile" + +[deploy] +healthcheckPath = "/healthz" +restartPolicyType = "ON_FAILURE" +restartPolicyMaxRetries = 10