Files
coolify/docker-compose.dev-multi.yml
Andras Bacsai 0d2c2a7701 Merge origin/main into v5-progress
Resolve conflicts between main's 4.5 changes and the v5 Node work:
- GetLogs: keep main's browser-side log viewer; read cluster logs from
  Sentinel, with since_unix_seconds for streaming.
- Terminal: keep main's session-failure events and attach mode; keep
  the Node terminal target.
- Dashboard: keep main's layout; add the cluster map as a third servers view.
- Remove the settings sidebar accordion from Node, cluster, and cluster
  application sidebars, as main did for servers.
- Replace removed x-forms.select with x-forms.listbox.
- Node factory creates its SSH key in the node team (main scopes key lookup).
- Add v5 models to the server transfer coverage and app key re-encrypt review.
2026-10-22 08:01:32 +02:00

218 lines
7.3 KiB
YAML

# Development stack used by scripts/dev: one isolated Compose project per dev
# instance (git branch), with its own container names, network, volumes, and ports.
#
# ./scripts/dev start # this branch's instance (KVM or testing-host)
# ./scripts/dev urls # all instances and their ports
# ./scripts/dev stop
#
# Env: <checkout>/.env, then <main checkout>/.dev-instances/<name>.env (generated).
# Optional profiles: vite, mailpit, minio, testing-host (scripts/dev enables them).
services:
coolify:
image: coolify:dev
pull_policy: never
container_name: "${COMPOSE_PROJECT_NAME:-coolify-dev}"
build:
context: .
dockerfile: ./docker/development/Dockerfile
args:
- USER_ID=${USERID:-1000}
- GROUP_ID=${GROUPID:-1000}
ports:
- "${DEV_BIND_ADDRESS:-0.0.0.0}:${APP_PORT:-8000}:8080"
- "${DEV_BIND_ADDRESS:-0.0.0.0}:${FORWARD_PUSHER_PORT:-6001}:6001"
- "${DEV_BIND_ADDRESS:-0.0.0.0}:${FORWARD_TERMINAL_PORT:-6002}:6002"
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
AUTORUN_ENABLED: "${AUTORUN_ENABLED:-false}"
APP_NAME: "${APP_NAME:-Coolify}"
APP_URL: "${APP_URL:-http://localhost:8000}"
APP_KEY: "${APP_KEY:-}"
APP_ENV: "${APP_ENV:-local}"
APP_DEBUG: "${APP_DEBUG:-true}"
DB_CONNECTION: pgsql
DB_HOST: postgres
DB_PORT: 5432
DB_DATABASE: "${DB_DATABASE:-coolify}"
DB_USERNAME: "${DB_USERNAME:-coolify}"
DB_PASSWORD: "${DB_PASSWORD:-password}"
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: "${REDIS_PASSWORD:-null}"
COOLIFY_CONTAINER_ROLE: "${COOLIFY_CONTAINER_ROLE:-all}"
PUSHER_HOST: "${PUSHER_HOST:-}"
# Browser-facing ports must match the host-published ports of this instance.
PUSHER_PORT: "${FORWARD_PUSHER_PORT:-6001}"
TERMINAL_PORT: "${FORWARD_TERMINAL_PORT:-6002}"
PUSHER_BACKEND_PORT: 6001
PUSHER_SCHEME: "${PUSHER_SCHEME:-http}"
PUSHER_APP_ID: "${PUSHER_APP_ID:-coolify}"
PUSHER_APP_KEY: "${PUSHER_APP_KEY:-coolify}"
PUSHER_APP_SECRET: "${PUSHER_APP_SECRET:-coolify}"
BROADCAST_CONNECTION: reverb
QUEUE_CONNECTION: redis
CACHE_STORE: redis
SESSION_DRIVER: redis
# Same values as the host-side `php artisan dev:qemu` call (config/development-qemu.php).
DEVELOPMENT_QEMU_INSTANCE: "${DEVELOPMENT_QEMU_INSTANCE:-}"
DEVELOPMENT_QEMU_SLOT: "${DEVELOPMENT_QEMU_SLOT:-}"
DEVELOPMENT_QEMU_DOCKER_NETWORK: "${COMPOSE_PROJECT_NAME:-coolify-dev}"
DEVELOPMENT_QEMU_COOLIFY_CONTAINER: "${COMPOSE_PROJECT_NAME:-coolify-dev}"
# Host paths of the volumes that testing-host mounts at /data/coolify and /data/coolify/backups.
# Coolify uses them only for the testing-host server (it shares the host Docker daemon), not for KVM servers.
DEV_COOLIFY_DATA_VOLUME: "${COMPOSE_PROJECT_NAME:-coolify-dev}_coolify_data"
DEV_COOLIFY_BACKUPS_VOLUME: "${COMPOSE_PROJECT_NAME:-coolify-dev}_backups_data"
healthcheck:
test: curl -sf http://127.0.0.1:8080/api/health || exit 1
interval: 5s
retries: 10
timeout: 2s
volumes:
- .:/var/www/html/:cached
- backups_data:/var/www/html/storage/app/backups
- ./docker/coolify-terminal/terminal-server.js:/terminal/terminal-server.js
- ./docker/coolify-terminal/terminal-utils.js:/terminal/terminal-utils.js
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- coolify
postgres:
image: postgres:15-alpine
pull_policy: always
ports:
- "${DEV_BIND_ADDRESS:-0.0.0.0}:${FORWARD_DB_PORT:-5432}:5432"
environment:
POSTGRES_USER: "${DB_USERNAME:-coolify}"
POSTGRES_PASSWORD: "${DB_PASSWORD:-password}"
POSTGRES_DB: "${DB_DATABASE:-coolify}"
POSTGRES_HOST_AUTH_METHOD: "trust"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 5s
retries: 10
timeout: 2s
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- coolify
redis:
image: redis:7-alpine
pull_policy: always
ports:
- "${DEV_BIND_ADDRESS:-0.0.0.0}:${FORWARD_REDIS_PORT:-6379}:6379"
healthcheck:
test: redis-cli ping
interval: 5s
retries: 10
timeout: 2s
volumes:
- redis_data:/data
networks:
- coolify
vite:
profiles: ["vite"]
image: node:24-alpine
pull_policy: always
working_dir: /var/www/html
environment:
# Set VITE_HOST in .env to a browser-reachable IP/hostname for LAN/Tailscale access
VITE_HOST: "${VITE_HOST:-localhost}"
VITE_PORT: "${VITE_PORT:-5173}"
VITE_PROTOCOL: "${VITE_PROTOCOL:-http}"
ports:
- "${DEV_BIND_ADDRESS:-0.0.0.0}:${VITE_PORT:-5173}:${VITE_PORT:-5173}"
volumes:
- .:/var/www/html/:cached
command: sh -c "npm install && npm run dev"
networks:
- coolify
testing-host:
profiles: ["testing-host"]
image: coolify-testing-host:dev
pull_policy: never
build:
context: .
dockerfile: ./docker/testing-host/Dockerfile
init: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- coolify_data:/data/coolify
# Same path as on the Docker host, so bind mounts created through the host daemon resolve.
- coolify_data:/var/lib/docker/volumes/${COMPOSE_PROJECT_NAME:-coolify-dev}_coolify_data/_data
- backups_data:/data/coolify/backups
- postgres_data:/data/coolify/_volumes/database
- redis_data:/data/coolify/_volumes/redis
- minio_data:/data/coolify/_volumes/minio
networks:
coolify:
# Seeders use this hostname for the localhost server.
aliases:
- coolify-testing-host
mailpit:
profiles: ["mailpit"]
image: axllent/mailpit:latest
pull_policy: always
ports:
- "${DEV_BIND_ADDRESS:-0.0.0.0}:${FORWARD_MAILPIT_PORT:-1025}:1025"
- "${DEV_BIND_ADDRESS:-0.0.0.0}:${FORWARD_MAILPIT_DASHBOARD_PORT:-8025}:8025"
networks:
coolify:
# InstanceSettingsSeeder points SMTP at coolify-mail (the legacy container name).
aliases:
- coolify-mail
minio:
profiles: ["minio"]
image: coollabsio/maxio:latest
pull_policy: always
ports:
- "${DEV_BIND_ADDRESS:-0.0.0.0}:${FORWARD_MINIO_PORT:-9000}:9000"
- "${DEV_BIND_ADDRESS:-0.0.0.0}:${FORWARD_MINIO_PORT_CONSOLE:-9001}:9001"
environment:
MINIO_ACCESS_KEY: "${MINIO_ACCESS_KEY:-minioadmin}"
MINIO_SECRET_KEY: "${MINIO_SECRET_KEY:-minioadmin}"
volumes:
- minio_data:/data
networks:
coolify:
# The seeded "Local MinIO" storage (S3StorageSeeder) uses http://coolify-minio:9000.
aliases:
- coolify-minio
minio-init:
profiles: ["minio"]
image: ghcr.io/coollabsio/mx:0.1.0
pull_policy: always
restart: "no"
depends_on:
- minio
entrypoint: >
/bin/sh -c "
until mc alias set local http://minio:9000 minioadmin minioadmin 2>/dev/null; do sleep 2; done;
mc mb local/local --ignore-existing;
"
networks:
- coolify
volumes:
backups_data:
postgres_data:
redis_data:
coolify_data:
minio_data:
networks:
coolify:
name: "${COMPOSE_PROJECT_NAME:-coolify-dev}"
driver: bridge