Initial v2 commit: complete rebuild with unified API + React admin
Phase 1-14 complete: - Unified Express.js API (TypeScript, Prisma ORM, PostgreSQL 16) - React Admin GUI (Vite + Ant Design + Zustand) - JWT auth with refresh tokens - Influence: Campaigns, Representatives, Responses, Email Queue - Map: Locations, Cuts, Shifts, Canvassing System - NAR data import infrastructure (2025 format) - Listmonk newsletter integration - Landing page builder (GrapesJS) - MkDocs + Code Server integration - Volunteer portal with GPS tracking - Monitoring stack (Prometheus, Grafana, Alertmanager) - Pangolin tunnel integration Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
95
Dockerfile.code-server
Normal file
95
Dockerfile.code-server
Normal file
@@ -0,0 +1,95 @@
|
||||
FROM codercom/code-server:latest
|
||||
|
||||
USER root
|
||||
|
||||
# Install Node.js 18+ and npm
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
|
||||
&& apt-get install -y nodejs
|
||||
|
||||
# Install Claude Code globally as root
|
||||
RUN npm install -g @anthropic-ai/claude-code
|
||||
|
||||
# Install Ollama (needs zstd for extraction)
|
||||
RUN apt-get update && apt-get install -y zstd && rm -rf /var/lib/apt/lists/* \
|
||||
&& curl -fsSL https://ollama.com/install.sh | sh
|
||||
|
||||
# Install Python and dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-venv \
|
||||
python3-full \
|
||||
pipx \
|
||||
# Dependencies for CairoSVG and Pillow (PIL)
|
||||
libcairo2-dev \
|
||||
libfreetype6-dev \
|
||||
libffi-dev \
|
||||
libjpeg-dev \
|
||||
libpng-dev \
|
||||
libz-dev \
|
||||
python3-dev \
|
||||
pkg-config \
|
||||
# Additional dependencies for advanced image processing
|
||||
libwebp-dev \
|
||||
libtiff5-dev \
|
||||
libopenjp2-7-dev \
|
||||
liblcms2-dev \
|
||||
libxml2-dev \
|
||||
libxslt1-dev \
|
||||
# PDF generation dependencies
|
||||
weasyprint \
|
||||
fonts-roboto \
|
||||
# Git for git-based plugins
|
||||
git \
|
||||
# For lxml
|
||||
zlib1g-dev \
|
||||
# Required for some plugins
|
||||
build-essential \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Switch to non-root user (coder)
|
||||
USER coder
|
||||
|
||||
# Set up a virtual environment for mkdocs
|
||||
RUN mkdir -p /home/coder/.venv
|
||||
RUN python3 -m venv /home/coder/.venv/mkdocs
|
||||
|
||||
# Install mkdocs-material in the virtual environment with all extras
|
||||
RUN /home/coder/.venv/mkdocs/bin/pip install "mkdocs-material[imaging,recommended,git]"
|
||||
|
||||
# Install additional useful MkDocs plugins
|
||||
RUN /home/coder/.venv/mkdocs/bin/pip install \
|
||||
mkdocs-minify-plugin \
|
||||
mkdocs-git-revision-date-localized-plugin \
|
||||
mkdocs-glightbox \
|
||||
mkdocs-redirects \
|
||||
mkdocs-awesome-pages-plugin \
|
||||
mkdocs-blog-plugin \
|
||||
mkdocs-rss-plugin \
|
||||
mkdocs-meta-descriptions-plugin \
|
||||
mkdocs-swagger-ui-tag \
|
||||
mkdocs-macros-plugin \
|
||||
mkdocs-material-extensions \
|
||||
mkdocs-section-index \
|
||||
mkdocs-table-reader-plugin \
|
||||
mkdocs-pdf-export-plugin \
|
||||
mkdocs-mermaid2-plugin \
|
||||
pymdown-extensions \
|
||||
pygments \
|
||||
pillow \
|
||||
cairosvg
|
||||
|
||||
# Add the virtual environment bin to PATH
|
||||
ENV PATH="/home/coder/.venv/mkdocs/bin:${PATH}"
|
||||
|
||||
# Add shell configuration to activate the virtual environment in .bashrc
|
||||
RUN echo 'export PATH="/home/coder/.venv/mkdocs/bin:$PATH"' >> ~/.bashrc
|
||||
RUN echo 'export PATH="/home/coder/.local/bin:$PATH"' >> ~/.bashrc
|
||||
|
||||
# Create a convenience script to simplify running mkdocs commands
|
||||
RUN mkdir -p /home/coder/.local/bin \
|
||||
&& echo '#!/bin/bash\ncd /home/coder/mkdocs\nmkdocs "$@"' > /home/coder/.local/bin/run-mkdocs \
|
||||
&& chmod +x /home/coder/.local/bin/run-mkdocs
|
||||
|
||||
WORKDIR /home/coder
|
||||
Reference in New Issue
Block a user