mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-04 03:27:09 -05:00 
			
		
		
		
	fix(server): access system config before database migration complete (#5912)
This commit is contained in:
		
							parent
							
								
									4dd7412a86
								
							
						
					
					
						commit
						e47e25e671
					
				@ -12,6 +12,7 @@ x-server-build: &server-common
 | 
				
			|||||||
    context: ../
 | 
					    context: ../
 | 
				
			||||||
    dockerfile: server/Dockerfile
 | 
					    dockerfile: server/Dockerfile
 | 
				
			||||||
    target: dev
 | 
					    target: dev
 | 
				
			||||||
 | 
					  restart: always
 | 
				
			||||||
  volumes:
 | 
					  volumes:
 | 
				
			||||||
    - ../server:/usr/src/app
 | 
					    - ../server:/usr/src/app
 | 
				
			||||||
    - ${UPLOAD_LOCATION}/photos:/usr/src/app/upload
 | 
					    - ${UPLOAD_LOCATION}/photos:/usr/src/app/upload
 | 
				
			||||||
 | 
				
			|||||||
@ -49,8 +49,9 @@ const providers: Provider[] = [
 | 
				
			|||||||
  ImmichLogger,
 | 
					  ImmichLogger,
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    provide: INITIAL_SYSTEM_CONFIG,
 | 
					    provide: INITIAL_SYSTEM_CONFIG,
 | 
				
			||||||
    inject: [SystemConfigService],
 | 
					    inject: [SystemConfigService, DatabaseService],
 | 
				
			||||||
    useFactory: async (configService: SystemConfigService) => {
 | 
					    useFactory: async (configService: SystemConfigService, databaseService: DatabaseService) => {
 | 
				
			||||||
 | 
					      await databaseService.init();
 | 
				
			||||||
      return configService.getConfig();
 | 
					      return configService.getConfig();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user