Sets up the complete mRemotify project — a browser-based remote connection manager — with a working pnpm workspace monorepo: Frontend (React + TypeScript + Vite + Ant Design 5): - Login page with JWT auth - Resizable sidebar with drag-and-drop connection tree (folders + connections) - Tabbed session area (SSH via xterm.js, RDP via guacamole-common-js) - Connection CRUD modal with SSH/RDP-specific fields - Zustand store for auth, tree data, and open sessions Backend (Fastify + TypeScript + Prisma + PostgreSQL): - JWT authentication (login + /me endpoint) - Full CRUD REST API for folders (self-referencing) and connections - AES-256-CBC password encryption at rest - WebSocket proxy for SSH sessions (ssh2 <-> xterm.js) - WebSocket proxy for RDP sessions (guacd TCP handshake + bidirectional relay) - Admin user seeding on first start Infrastructure: - Docker Compose: postgres (healthcheck) + guacd + backend + frontend/nginx - nginx: serves SPA, proxies /api and /ws (with WebSocket upgrade) to backend - .env.example with all required variables documented Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
62 lines
1.2 KiB
YAML
62 lines
1.2 KiB
YAML
version: '3.9'
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: mremotify
|
|
POSTGRES_PASSWORD: mremotify
|
|
POSTGRES_DB: mremotify
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
networks:
|
|
- internal
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'pg_isready -U mremotify']
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
guacd:
|
|
image: guacamole/guacd:1.5.4
|
|
restart: unless-stopped
|
|
networks:
|
|
- internal
|
|
|
|
backend:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/backend.Dockerfile
|
|
restart: unless-stopped
|
|
env_file: .env
|
|
environment:
|
|
POSTGRES_URL: postgresql://mremotify:mremotify@postgres:5432/mremotify
|
|
GUACD_HOST: guacd
|
|
GUACD_PORT: '4822'
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
guacd:
|
|
condition: service_started
|
|
networks:
|
|
- internal
|
|
|
|
frontend:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/frontend.Dockerfile
|
|
restart: unless-stopped
|
|
ports:
|
|
- '80:80'
|
|
depends_on:
|
|
- backend
|
|
networks:
|
|
- internal
|
|
|
|
networks:
|
|
internal:
|
|
|
|
volumes:
|
|
postgres_data:
|