feat: initial project setup
- FastAPI backend (Python 3.12, uv) - React 19 + TypeScript + Vite frontend - Devcontainer with Node 22, Python 3.12, uv, opencode - Basic app structure and project docs
This commit is contained in:
commit
418318152a
20 changed files with 2324 additions and 0 deletions
43
.devcontainer/Dockerfile
Normal file
43
.devcontainer/Dockerfile
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
FROM mcr.microsoft.com/devcontainers/base:debian
|
||||
|
||||
ARG FORGEJO_USERNAME
|
||||
ENV FORGEJO_USERNAME=${FORGEJO_USERNAME}
|
||||
|
||||
# SSH (missing from base image)
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends openssh-client \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Node.js 22 + npm (npm tree copied; bin symlinks recreated - COPY dereferences them)
|
||||
COPY --from=node:22-slim /usr/local/bin/node /usr/local/bin/
|
||||
COPY --from=node:22-slim /usr/local/lib/node_modules /usr/local/lib/node_modules
|
||||
RUN ln -s ../lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \
|
||||
&& ln -s ../lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx
|
||||
|
||||
# uv (from distroless)
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
|
||||
|
||||
# Python 3.12 (system-shared location; default /root is unreadable for vscode)
|
||||
ENV UV_PYTHON_INSTALL_DIR=/opt/uv/python
|
||||
RUN uv python install 3.12 \
|
||||
&& ln -s /opt/uv/python/cpython-3.12-linux-x86_64-gnu/bin/python3.12 /usr/local/bin/python3.12 \
|
||||
&& ln -s python3.12 /usr/local/bin/python3 \
|
||||
&& ln -s python3 /usr/local/bin/python
|
||||
|
||||
# Trust the workspace bind mount (source on Windows FS -> uid mismatch)
|
||||
RUN git config --system --add safe.directory /workspaces/kirche-einfach
|
||||
|
||||
# Pre-create named-volume targets (volumes inherit image content on first mount)
|
||||
RUN mkdir -p /workspaces/kirche-einfach/backend/.venv \
|
||||
/workspaces/kirche-einfach/frontend/node_modules
|
||||
|
||||
# opencode (as non-root user)
|
||||
USER vscode
|
||||
RUN curl -fsSL https://opencode.ai/install | bash
|
||||
USER root
|
||||
RUN ln -s /home/vscode/.opencode/bin/opencode /usr/local/bin/opencode
|
||||
|
||||
# Fix ownership (home + volume targets so vscode user can write)
|
||||
RUN chown -R vscode:vscode /home/vscode /workspaces
|
||||
|
||||
CMD ["sleep", "infinity"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue