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
This commit is contained in:
Claude 2026-03-05 13:38:25 +00:00
parent 62afaf261b
commit d45cae027e
No known key found for this signature in database
2 changed files with 47 additions and 0 deletions

39
Dockerfile Normal file
View file

@ -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}"]

8
railway.toml Normal file
View file

@ -0,0 +1,8 @@
[build]
builder = "DOCKERFILE"
dockerfilePath = "Dockerfile"
[deploy]
healthcheckPath = "/healthz"
restartPolicyType = "ON_FAILURE"
restartPolicyMaxRetries = 10