[PR #168] [MERGED] fix: initialize appsettings.extra.json with valid empty JSON in init container #161

Closed
opened 2026-02-26 17:37:34 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Corsinvest/cv4pve-admin/pull/168
Author: @franklupo
Created: 2/18/2026
Status: Merged
Merged: 2/18/2026
Merged by: @franklupo

Base: mainHead: fix/docker-compose-appsettings-init


📝 Commits (1)

  • 08fa0f1 fix: initialize appsettings.extra.json with empty JSON object in init container

📊 Changes

2 files changed (+2 additions, -2 deletions)

View changed files

📝 src/docker/docker-compose-ce.yaml (+1 -1)
📝 src/docker/docker-compose-ee.yaml (+1 -1)

📄 Description

Summary

  • Replace touch /app/config/appsettings.extra.json with [ -f ... ] || echo '{}' > ... in both CE and EE docker-compose init containers
  • Fixes startup crash: ASP.NET Core throws JsonReaderException when loading an empty file via AddJsonFile
  • The file is only created if it doesn't already exist, preserving any user configuration

Test plan

  • Fresh deploy: verify appsettings.extra.json is created with {} content
  • Existing deploy: verify existing appsettings.extra.json is not overwritten
  • App starts without InvalidDataException / JsonReaderException

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Corsinvest/cv4pve-admin/pull/168 **Author:** [@franklupo](https://github.com/franklupo) **Created:** 2/18/2026 **Status:** ✅ Merged **Merged:** 2/18/2026 **Merged by:** [@franklupo](https://github.com/franklupo) **Base:** `main` ← **Head:** `fix/docker-compose-appsettings-init` --- ### 📝 Commits (1) - [`08fa0f1`](https://github.com/Corsinvest/cv4pve-admin/commit/08fa0f1d181d949f97bb8a59bb026f709f62d1c5) fix: initialize appsettings.extra.json with empty JSON object in init container ### 📊 Changes **2 files changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/docker/docker-compose-ce.yaml` (+1 -1) 📝 `src/docker/docker-compose-ee.yaml` (+1 -1) </details> ### 📄 Description ## Summary - Replace `touch /app/config/appsettings.extra.json` with `[ -f ... ] || echo '{}' > ...` in both CE and EE docker-compose init containers - Fixes startup crash: ASP.NET Core throws `JsonReaderException` when loading an empty file via `AddJsonFile` - The file is only created if it doesn't already exist, preserving any user configuration ## Test plan - [ ] Fresh deploy: verify `appsettings.extra.json` is created with `{}` content - [ ] Existing deploy: verify existing `appsettings.extra.json` is not overwritten - [ ] App starts without `InvalidDataException` / `JsonReaderException` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 17:37:34 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cv4pve-admin#161
No description provided.