mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-07-26 07:58:14 +00:00
fix: use shared host mount for answer files + rename to pve-integration
WORK_DIR now defaults to /opt/pve-integration/work (under the shared host mount) instead of /tmp/pve-integration (container-local). This fixes the answer server seeing empty answer files — the dev-infra container writes answer files to WORK_DIR, and the answer server container (a sibling) needs to read them from the same host path. Also: - Renamed mount from /opt/pve-isos to /opt/pve-integration - Added must_run=true, start=true to answer server container - Updated docker-compose.test.yml and dev.ps1 remote override Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -163,7 +163,7 @@ services:
|
||||
dev-infra:
|
||||
volumes:
|
||||
- ${RemoteRepoPath}:/repo
|
||||
- /opt/pve-isos:/opt/pve-isos
|
||||
- /opt/pve-integration:/opt/pve-integration
|
||||
"@ | Set-Content -Path $OverrideFile -Encoding utf8
|
||||
|
||||
$ComposeArgs = @('-f', $ComposeFile, '-f', $OverrideFile)
|
||||
@@ -254,7 +254,7 @@ if ($Integration) {
|
||||
Start-InfraContainer
|
||||
|
||||
# Verify environment is ready (config file exists from provisioning)
|
||||
$configCheck = docker exec $InfraContainer bash -c 'test -f "${CONFIG_FILE:-/tmp/pve-integration/config.json}" && echo OK || echo MISSING'
|
||||
$configCheck = docker exec $InfraContainer bash -c 'test -f "${CONFIG_FILE:-/opt/pve-integration/work/config.json}" && echo OK || echo MISSING'
|
||||
if ($configCheck.Trim() -eq 'MISSING' -and -not $Provision) {
|
||||
throw "Integration environment not ready. Run with -Provision first, or use -Provision -Integration together."
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ services:
|
||||
profiles: [infra]
|
||||
volumes:
|
||||
- ..:/repo
|
||||
- /opt/pve-isos:/opt/pve-isos
|
||||
- /opt/pve-integration:/opt/pve-integration
|
||||
# WARNING: Mounting the Docker socket grants this container root-equivalent
|
||||
# access to the host's Docker daemon. Only use on trusted, isolated machines.
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
@@ -46,8 +46,8 @@ INFRA_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||
REPO_ROOT="$(cd "$INFRA_DIR/../.." && pwd)"
|
||||
|
||||
# ── Defaults ────────────────────────────────────────────────────────
|
||||
CACHE_DIR="${CACHE_DIR:-/opt/pve-isos}"
|
||||
WORK_DIR="${WORK_DIR:-${RUNNER_TEMP:-/tmp/pve-integration}}"
|
||||
CACHE_DIR="${CACHE_DIR:-/opt/pve-integration}"
|
||||
WORK_DIR="${WORK_DIR:-${RUNNER_TEMP:-$CACHE_DIR/work}}"
|
||||
CONFIG_FILE="${CONFIG_FILE:-$WORK_DIR/config.json}"
|
||||
MODULE_ARTIFACT="${MODULE_ARTIFACT:-$REPO_ROOT/publish/netstandard2.0}"
|
||||
PVE_VERSIONS="${PVE_VERSIONS:-9 8}"
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
# ── Answer server container ──────────────────────────────────────────
|
||||
|
||||
resource "docker_container" "answer_server" {
|
||||
name = "pvetest-answer-server"
|
||||
image = "slothcroissant/proxmox-auto-installer-server:latest"
|
||||
restart = "unless-stopped"
|
||||
name = "pvetest-answer-server"
|
||||
image = "slothcroissant/proxmox-auto-installer-server:latest"
|
||||
restart = "unless-stopped"
|
||||
must_run = true
|
||||
start = true
|
||||
|
||||
network_mode = "host"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user