@@ -326,6 +326,7 @@ describe('generateDatabase — tokenRepository.ts', () => {
326326 expect ( compose ) . toContain ( 'user: root' ) ;
327327 expect ( compose ) . toContain ( 'tsx watch src/index.ts' ) ;
328328 expect ( compose ) . toContain ( 'su-exec node' ) ;
329+ expect ( compose ) . toContain ( 'chown -R node:node /app/node_modules' ) ;
329330 expect ( compose ) . toContain ( '3000:3000' ) ;
330331 expect ( compose ) . toContain ( './package.json:/app/package.json:ro' ) ;
331332 expect ( compose ) . toContain ( 'app_node_modules:/app/node_modules' ) ;
@@ -338,6 +339,7 @@ describe('generateDatabase — tokenRepository.ts', () => {
338339 expect ( compose ) . toContain ( 'dockerfile: Dockerfile.app-extension-ui' ) ;
339340 expect ( compose ) . toContain ( 'npm run dev:frontend' ) ;
340341 expect ( compose ) . toContain ( 'su-exec node' ) ;
342+ expect ( compose ) . toContain ( 'chown -R node:node /app/node_modules' ) ;
341343 expect ( compose ) . toContain ( '5173:5173' ) ;
342344 expect ( compose ) . toContain ( './package.json:/app/package.json:ro' ) ;
343345 expect ( compose ) . toContain ( 'app_extension_ui_node_modules:/app/node_modules' ) ;
@@ -384,6 +386,8 @@ describe('generateDatabase — tokenRepository.ts', () => {
384386 expect ( compose ) . toContain ( 'DATABASE_URL: postgresql://app:app@db:5432/test-app' ) ;
385387 expect ( compose ) . toContain ( 'depends_on:' ) ;
386388 expect ( compose ) . toContain ( 'condition: service_healthy' ) ;
389+ expect ( compose ) . toContain ( 'postgres_data:/var/lib/postgresql/data' ) ;
390+ expect ( compose ) . not . toContain ( 'db_data:' ) ;
387391 } ) ;
388392
389393 it ( 'postgres schema uses text for access_token and refresh_token' , async ( ) => {
@@ -489,6 +493,14 @@ describe('generateDatabase — ComposeBuilder behavior', () => {
489493 expect ( content ) . not . toContain ( 'app-extension-ui' ) ;
490494 expect ( content ) . not . toContain ( 'Dockerfile.app-extension-ui' ) ;
491495 } ) ;
496+
497+ it ( 'mysql with app extensions uses mysql_data volume name' , async ( ) => {
498+ const { generateDatabase } = await import ( './database.js' ) ;
499+ await generateDatabase ( tmpDir , { ...mysqlOptions , appExtensions : [ 'custom-panel' ] } ) ;
500+ const compose = await read ( 'docker-compose.yml' ) ;
501+ expect ( compose ) . toContain ( 'mysql_data:/var/lib/mysql' ) ;
502+ expect ( compose ) . not . toContain ( 'db_data:' ) ;
503+ } ) ;
492504} ) ;
493505
494506describe ( 'generateDatabase — Dockerfile' , ( ) => {
0 commit comments