docker-compose.yml
Rama main · réplica de lectura del repositorio original.
# ── NineDeploy development environment ──────────────────────────────────
# Boots the API server + web dev server with the host Docker socket mounted.
# SQLite, repos, logs and backups live in the `ninedeploy-data` volume.
#
# docker compose up
#
# Dashboard: http://localhost:5173 (Vite dev, proxies /v1 to the API)
# API: http://localhost:3000
#
# NOTE: this is for development only. Production installs should use the
# bare-metal installer (install.sh + systemd), which has native PM2 access.
services:
server:
build:
context: .
dockerfile: Dockerfile
target: build
# The server self-migrates on startup — no manual migration step needed.
command: sh -c "pnpm --filter @ninedeploy/server dev"
ports:
- "3000:3000"
environment:
NODE_ENV: development
NINEDEPLOY_DATA_DIR: /data
NINEDEPLOY_DB_PATH: /data/ninedeploy.db
NINEDEPLOY_PUBLIC_URL: http://localhost:3000
# Optional (see .env.example for details):
# NINEDEPLOY_ACME_EMAIL: admin@example.com
# NINEDEPLOY_DNS_PROVIDER: cloudflare
# NINEDEPLOY_DNS_TOKEN: <api-token>
# NINEDEPLOY_WILDCARD_DOMAIN: example.com
# NINEDEPLOY_TEMPLATES_SOURCE: https://example.com/registry.json
# NINEDEPLOY_DEPLOY_CONCURRENCY: "1"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ninedeploy-data:/data
- ./apps:/app/apps:ro
- ./packages:/app/packages:ro
web:
image: node:26-slim
working_dir: /app
# Node >= 26 images no longer bundle corepack (see the Dockerfile), so
# the old corepack bootstrap died with "not found" before anything installed.
# Keep the pnpm version in sync with "packageManager" in package.json.
command: sh -c "npm install -g pnpm@11.23.0 && pnpm install --frozen-lockfile && pnpm --filter @ninedeploy/web dev --host 0.0.0.0"
ports:
- "5173:5173"
environment:
# Vite proxies /v1 requests to the API service.
VITE_API_URL: http://server:3000
volumes:
# Writable (no :ro): `pnpm install` creates node_modules inside each
# workspace package — read-only mounts would make it fail with EROFS.
- ./apps/web:/app/apps/web
- ./packages:/app/packages
- ./package.json:/app/package.json
- ./pnpm-workspace.yaml:/app/pnpm-workspace.yaml
- ./pnpm-lock.yaml:/app/pnpm-lock.yaml
# A frozen install applies the workspace's patchedDependencies and its
# .npmrc settings; without them it fails on a missing patch file.
- ./.npmrc:/app/.npmrc:ro
- ./patches:/app/patches:ro
depends_on:
- server
volumes:
ninedeploy-data: