1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-29 15:11:58 +00:00

fix(server): access system config before database migration complete (#5912)

This commit is contained in:
Alex 2023-12-21 12:52:49 -06:00 committed by GitHub
parent 4dd7412a86
commit e47e25e671
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -12,6 +12,7 @@ x-server-build: &server-common
context: ../
dockerfile: server/Dockerfile
target: dev
restart: always
volumes:
- ../server:/usr/src/app
- ${UPLOAD_LOCATION}/photos:/usr/src/app/upload

View file

@ -49,8 +49,9 @@ const providers: Provider[] = [
ImmichLogger,
{
provide: INITIAL_SYSTEM_CONFIG,
inject: [SystemConfigService],
useFactory: async (configService: SystemConfigService) => {
inject: [SystemConfigService, DatabaseService],
useFactory: async (configService: SystemConfigService, databaseService: DatabaseService) => {
await databaseService.init();
return configService.getConfig();
},
},