一键导入
nx-docker
Docker and containerization for Nx projects. Use when building images, managing containers, or working with docker-compose.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Docker and containerization for Nx projects. Use when building images, managing containers, or working with docker-compose.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Auth engine rules for QAuth. Use when working with CredentialProvider implementations, token claim generation, the provider registry, or the federation layer. Enforces the pluggable provider pattern and correct token claim behaviour.
OAuth 2.1 / OIDC rules for QAuth. Use when working with authorization endpoints, token flows, PKCE, JWKS, OIDC discovery, or spec compliance (RFC 9700, OIDC Core 1.0). Covers endpoint behaviour, email claim rules, and token security.
Database schema rules for QAuth. Use when working with the identity model, Drizzle ORM, migrations, repositories, or claim resolution. Reflects the CURRENT shipped schema — the identifier-abstraction model (ADR-002, IMPLEMENTED via Epic
Link GitHub issues in parent-child (sub-issue) relationships using GraphQL
Add a GitHub issue to a project board using gh project item-add
Create a new GitHub issue following QAuth project conventions using gh issue create
基于 SOC 职业分类
| name | nx-docker |
| description | Docker and containerization for Nx projects. Use when building images, managing containers, or working with docker-compose. |
# Start services
docker compose up -d
docker compose up -d postgres redis
# Logs
docker compose logs -f
# Stop
docker compose down
docker compose down -v # Remove volumes
| Service | Port | Purpose |
|---|---|---|
postgres | 5432 | PostgreSQL 18 |
redis | 6379 | Redis 7 cache |
# Build with Nx
pnpm nx build auth-server --configuration=production
# Build Docker image
docker build -t qauth/auth-server:latest -f apps/auth-server/Dockerfile .
# Prune for minimal image
pnpm nx run auth-server:prune
# Stage 1: Build
FROM node:24-alpine AS builder
WORKDIR /app
COPY . .
RUN pnpm install --frozen-lockfile
RUN pnpm nx build auth-server --configuration=production
RUN pnpm nx run auth-server:prune
# Stage 2: Run
FROM node:24-alpine AS runner
WORKDIR /app
COPY --from=builder /app/dist/apps/auth-server .
RUN pnpm install --prod --frozen-lockfile
CMD ["node", "main.js"]
docker compose up -d postgres redis
docker compose exec postgres pg_isready -U postgres
pnpm nx run infra-db:db:migrate
pnpm nx run infra-db:db:seed
pnpm nx serve auth-server
docker compose exec postgres bash
docker compose exec postgres psql -U postgres -d qauth
docker compose exec redis redis-cli
docker compose down # Stop containers
docker compose down -v # Remove volumes
docker compose down --rmi local # Remove images
import { PostgreSqlContainer } from '@testcontainers/postgresql';
const container = await new PostgreSqlContainer().withDatabase('qauth_test').start();