fix(install): remove root-level name from docker-compose files for older compose compat

The `name` property at the root level of docker-compose files is only
supported in Docker Compose v2+. Older versions (and v1 fallback paths)
validate against a JSON schema that rejects it, causing the self-host
installer to fail with `(root) Additional property name is not allowed`.

To preserve the same project name behavior, pass `-p multica` explicitly
in all docker compose invocations.

Fixes #1401
This commit is contained in:
Jiayuan Zhang
2026-04-21 04:52:38 +08:00
parent 9e47b83f02
commit f3f2d06cd2
5 changed files with 9 additions and 13 deletions

View File

@@ -233,7 +233,7 @@ function Install-Server {
}
Write-Info "Starting Multica services (this may take a few minutes on first run)..."
docker compose -f docker-compose.selfhost.yml up -d --build
docker compose -p multica -f docker-compose.selfhost.yml up -d --build
Write-Info "Waiting for backend to be ready..."
$ready = $false
@@ -251,7 +251,7 @@ function Install-Server {
Write-Ok "Multica server is running"
} else {
Write-Warn "Server is still starting. Check logs with:"
Write-Host " cd $InstallDir; docker compose -f docker-compose.selfhost.yml logs"
Write-Host " cd $InstallDir; docker compose -p multica -f docker-compose.selfhost.yml logs"
}
Pop-Location
@@ -327,7 +327,7 @@ function Start-Stop {
if (Test-Path $InstallDir) {
Push-Location $InstallDir
if (Test-Path "docker-compose.selfhost.yml") {
docker compose -f docker-compose.selfhost.yml down
docker compose -p multica -f docker-compose.selfhost.yml down
Write-Ok "Docker services stopped"
} else {
Write-Warn "No docker-compose.selfhost.yml found at $InstallDir"

View File

@@ -261,7 +261,7 @@ setup_server() {
# Start Docker Compose
info "Starting Multica services (this may take a few minutes on first run)..."
docker compose -f docker-compose.selfhost.yml up -d --build
docker compose -p multica -f docker-compose.selfhost.yml up -d --build
# Wait for health check
info "Waiting for backend to be ready..."
@@ -278,7 +278,7 @@ setup_server() {
ok "Multica server is running"
else
warn "Server is still starting. You can check logs with:"
echo " cd $INSTALL_DIR && docker compose -f docker-compose.selfhost.yml logs"
echo " cd $INSTALL_DIR && docker compose -p multica -f docker-compose.selfhost.yml logs"
echo ""
fi
}
@@ -355,7 +355,7 @@ run_stop() {
if [ -d "$INSTALL_DIR" ]; then
cd "$INSTALL_DIR"
if [ -f docker-compose.selfhost.yml ]; then
docker compose -f docker-compose.selfhost.yml down
docker compose -p multica -f docker-compose.selfhost.yml down
ok "Docker services stopped"
else
warn "No docker-compose.selfhost.yml found at $INSTALL_DIR"