You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> **v2 change (2026-05-15):** PostgreSQL replaces SQLite as the data store. A `provisioning` container runs the HTTP provisioning adapter. Total containers: 4 (`postgres`, `provisioning`, `api`, `worker`).
20
+
19
21
---
20
22
21
23
## Prerequisites
@@ -43,7 +45,7 @@ VRSC mainnet and VRSCTEST use identical octets on their respective networks —
> **Caddy is dual-homed.** It is already connected to `net-vrsctest` from the qrcodes deployment (playbook `37`). No network changes needed for this deployment.
79
+
---
80
+
81
+
## Containers (v2)
82
+
83
+
| Container | Service | IP | Port |
84
+
|---|---|---|---|
85
+
|`dev200_idcreate-postgres-1`| PostgreSQL 16-alpine | auto |`5432` (host: `127.0.0.1:5432`) |
86
+
|`dev200_idcreate-provisioning-1`| Node.js provisioning scripts | auto |`5055` (host: `127.0.0.1:5055`) |
|`dev200_idcreate-worker-1`| Polling worker | auto | — (internal) |
72
89
73
90
---
74
91
75
-
## Environment Variables Written by Playbook 41
92
+
## Environment Variables Set by Playbook 41
76
93
77
94
Playbook `41-idcreate-deploy.yml` reads VRSCTEST RPC credentials from `~/docker-verusd/vrsctest/data_dir/vrsctest.conf` and writes these to `~/svc-idcreate/.env`:
78
95
@@ -86,18 +103,18 @@ verusd_vrsc_rpc_port=18843
86
103
verusd_vrsc_rpc_host=10.200.0.11
87
104
```
88
105
89
-
> **SFConstants mapping:** The VRSCTEST chain hijacks the `DAEMON_VERUSD_VRSC` slot in `SFConstants.py` via `NATIVE_COIN="VRSCTEST"`. There is no separate VRSCTEST daemon slot.
No provisioning service — not ready yet. Focus is on the id creation base Python service.
117
+
> **SFConstants mapping:** The VRSCTEST chain hijacks the `DAEMON_VERUSD_VRSC` slot in `SFConstants.py` via `NATIVE_COIN="VRSCTEST"`. There is no separate VRSCTEST daemon slot.
|`502 Bad Gateway`| Caddy not on `net-vrsctest`| Run `37-qrcodes-caddy-network.yml` (should already be done) |
207
246
|`Connection refused`| idcreate container not running | Run `41-idcreate-deploy.yml`; check `docker logs dev200_idcreate-api-1`|
208
247
|`500 Internal Server Error`| RPC connection failed | Verify VRSCTEST daemon running; check `docker logs dev200_idcreate-api-1` for RPC errors |
248
+
|`database is locked` (v1 only) | SQLite concurrent write conflict | Upgrade to v2 — PostgreSQL handles concurrent access |
209
249
|`curl: (6) Could not resolve host`| DNS not propagated | Wait 5-10 minutes for Let's Encrypt DNS propagation |
210
250
| Container keeps restarting | Health check failing or bad env vars |`docker logs dev200_idcreate-api-1`; verify `.env` has correct RPC port and credentials |
211
-
|Route not responding|Caddyfile stale | Run `42-idcreate-caddy-route.yml` again to reload|
251
+
|PostgreSQL container not healthy|postgres not ready yet | Wait up to 150s; check `docker logs dev200_idcreate-postgres-1`|
-**2026-04-29** — Created. Mirrors the qrcodes VRSCTEST deployment pattern. Deploys api + worker only; provisioning service excluded (not ready). VRSCTEST uses the `DAEMON_VERUSD_VRSC` slot via `NATIVE_COIN="VRSCTEST"` — no separate VRSCTEST slot in `SFConstants.py`.
307
+
-**2026-04-29** — Created. Mirrors the qrcodes VRSCTEST deployment pattern. Deploys api + worker only; provisioning service excluded (not ready). VRSCTEST uses the `DAEMON_VERUSD_VRSC` slot via `NATIVE_COIN="VRSCTEST"`.
308
+
-**2026-05-15** — v2 postgres migration. Replaces SQLite with PostgreSQL 16-alpine. Adds provisioning adapter in HTTP mode (`PROVISIONING_ADAPTER_MODE=http`). Total containers increases from 2 to 4. `database is locked` errors are resolved.
> **v2 change (2026-05-15):** PostgreSQL container is now part of the stack. The update playbook waits for postgres to be healthy before declaring success. Total containers: 4.
20
+
19
21
---
20
22
21
23
## Prerequisites
@@ -41,7 +43,8 @@ This playbook (in order):
41
43
4.**Stops** running containers
42
44
5.**Rebuilds**`buildwithdreams/svc-idcreate:local` from latest code
43
45
6.**Starts** containers with `docker compose up -d --force-recreate`
44
-
7.**Verifies** api container appears in `docker ps`
46
+
7.**Waits** for postgres container to become healthy (`pg_isready`)
47
+
8.**Verifies** api container appears in `docker ps`
45
48
46
49
> `.env` is restored unconditionally after every pull. This is required because git operations can remove or replace untracked files during merge/rebase.
|`40`|`40-idcreate-build.yml`| Build image (used by 45, rarely needed alone) |
134
140
|`41`|`41-idcreate-deploy.yml`| Full deploy — writes `.env` fresh |
141
+
|`47`|`47-idcreate-restart.yml`| Restart to pick up .env changes (includes postgres health wait) |
135
142
136
143
---
137
144
138
145
## History
139
146
140
147
-**2026-04-30** — Created. Pull/rebuild/restart pattern for svc-idcreate on VRSCTEST. `.env` is backed up before pull and restored unconditionally after to survive git merge side-effects.
148
+
-**2026-05-15** — v2 postgres migration. PostgreSQL 16-alpine added to stack. Update playbook now waits for `postgres` container to be healthy before completing. `database is locked` errors from v1 are resolved.
0 commit comments