The provisioner's BitwardenHelper.login() was missing the critical `bw sync` step that the host wrapper includes. Without syncing after login, the container's local vault cache was empty/stale, causing items to vanish between container runs. Added sync() call at end of login() and before list_items(). Also fixed container UID/GID to match host user (1002:1002) for proper bind-mount access, and added source-code volume mounts for fast iteration. Verified with 5-phase cross-container persistence test (create in container A, verify in fresh container B, update in C, confirm in D).
16 lines
519 B
YAML
16 lines
519 B
YAML
services:
|
|
provision:
|
|
build: .
|
|
container_name: tsys-agent-provisioner
|
|
env_file:
|
|
- ${BW_ENV_FILE:-${HOME}/.config/bw/env}
|
|
user: "provision"
|
|
volumes:
|
|
- ./agents.yaml:/app/agents.yaml:ro
|
|
- ./state:/app/state
|
|
- ./bw-state:/home/provision/.config/Bitwarden CLI
|
|
- ./bw_helper.py:/app/bw_helper.py:ro
|
|
- ./provision-agent.py:/app/provision-agent.py:ro
|
|
- ./test_bw_helper.py:/app/test_bw_helper.py:ro
|
|
- ./test_bw_persistence.py:/app/test_bw_persistence.py:ro
|