@dooer/dooer-test-env 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -89,7 +89,10 @@ module.exports = {
89
89
  if (fs.existsSync(rt.OVERRIDE_FILE))
90
90
  ov = yaml.safeLoad(fs.readFileSync(rt.OVERRIDE_FILE, 'utf8')) || { services: {} }
91
91
  ov.services = ov.services || {}
92
- ov.services[a.name] = { image }
92
+ // Keep DOOER_SERVICE_VERSION in sync with the tag: the logging library stamps it on every log
93
+ // line (and the applicationChain), so a bare image bump leaves logs reporting the manifest's
94
+ // stale version — the same drift deploy-staging.sh exists to prevent.
95
+ ov.services[a.name] = { image, environment: { DOOER_SERVICE_VERSION: a.tag } }
93
96
  rt.ensureRunDir()
94
97
  fs.writeFileSync(rt.OVERRIDE_FILE, yaml.safeDump(ov))
95
98
  const st = rt.readState()
@@ -38,6 +38,11 @@ const DEV = {
38
38
  sqlPassword: 'dooer',
39
39
  minioUser: 'minioadmin',
40
40
  minioPassword: 'minioadmin',
41
+ // Redis MUST have a password locally, like staging (the redis-password secret). service-graphql's
42
+ // pubsub.js does `password ? createRedisClient(...).then(c => new RedisPubSub(...)) : async () => null`
43
+ // — with no password it exports a FUNCTION, and `await fn` yields the function itself, so every GraphQL
44
+ // subscription dies on `pubsubInstance.asyncIterator is not a function`. (Jimmy 2026-09-03.)
45
+ redisPassword: 'dooer',
41
46
  }
42
47
 
43
48
  // Applied to EVERY dooer service, last, so they win over the manifest values.
@@ -138,7 +143,7 @@ const OMIT = Symbol('omit-env')
138
143
  function secretDefault(name) {
139
144
  if (name === 'DOOER_SQL_APPLICATION_PASSWORD') return DEV.sqlPassword
140
145
  if (name === 'DOOER_SQL_MIGRATION_PASSWORD') return DEV.sqlPassword
141
- if (name === 'SECRET_DOOER_REDIS_PASSWORD') return '' // local redis has no auth; empty is the correct value
146
+ if (name === 'SECRET_DOOER_REDIS_PASSWORD') return DEV.redisPassword // local redis runs with --requirepass
142
147
  if (/ACCESS_KEY_ID$/.test(name)) return DEV.minioUser
143
148
  if (/SECRET_ACCESS_KEY$/.test(name)) return DEV.minioPassword
144
149
  return OMIT
@@ -231,6 +236,8 @@ function infraServices() {
231
236
  },
232
237
  redis: {
233
238
  image: 'redis:7-alpine',
239
+ // password-protected like staging — see DEV.redisPassword for why it matters (GraphQL subscriptions).
240
+ command: ['redis-server', '--requirepass', DEV.redisPassword],
234
241
  ports: ['6379:6379'],
235
242
  restart: 'unless-stopped',
236
243
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dooer/dooer-test-env",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Run the whole Dooer backend locally (staging DB minus customers), copy/purge customers between environments, and shred — one CLI.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": "Dooer/cli-dooer-test-env",