Set up configuration file system #6

Closed
opened 2026-01-27 07:08:44 +00:00 by maj · 0 comments
Owner

Create the configuration file system for managing test credentials and build options. Implement environment variable overrides for CI/CD.

Tasks

  • Create config.example.json with template
  • Add config.json to .gitignore
  • Create scripts/load-config.sh to parse JSON and export env vars
  • Document environment variable overrides in README
  • Add validation for required config fields
  • Create scripts/validate-config.sh
  • Update README with configuration instructions

config.example.json Structure

{
  "nextcloud": {
    "url": "https://cloud.example.com",
    "username": "your-username",
    "password": "your-password"
  },
  "settings": {
    "maxRecentFolders": 5,
    "uploadChunkSize": 10485760
  }
}

Environment Variables

  • NEXTCLOUD_URL - Override Nextcloud server URL
  • NEXTCLOUD_USER - Override username
  • NEXTCLOUD_PASSWORD - Override password
  • CONFIG_FILE - Path to config file (default: config.json)

Acceptance Criteria

  • config.example.json created and documented
  • load-config.sh correctly parses JSON
  • Environment variables take precedence over JSON
  • Validation script catches missing required fields
  • Documentation clear for new developers
  • CI can inject credentials via env vars
Create the configuration file system for managing test credentials and build options. Implement environment variable overrides for CI/CD. ## Tasks - [ ] Create `config.example.json` with template - [ ] Add `config.json` to .gitignore - [ ] Create `scripts/load-config.sh` to parse JSON and export env vars - [ ] Document environment variable overrides in README - [ ] Add validation for required config fields - [ ] Create `scripts/validate-config.sh` - [ ] Update README with configuration instructions ## config.example.json Structure ```json { "nextcloud": { "url": "https://cloud.example.com", "username": "your-username", "password": "your-password" }, "settings": { "maxRecentFolders": 5, "uploadChunkSize": 10485760 } } ``` ## Environment Variables - `NEXTCLOUD_URL` - Override Nextcloud server URL - `NEXTCLOUD_USER` - Override username - `NEXTCLOUD_PASSWORD` - Override password - `CONFIG_FILE` - Path to config file (default: config.json) ## Acceptance Criteria - [ ] config.example.json created and documented - [ ] load-config.sh correctly parses JSON - [ ] Environment variables take precedence over JSON - [ ] Validation script catches missing required fields - [ ] Documentation clear for new developers - [ ] CI can inject credentials via env vars
maj added this to the Milestone 1: Project Infrastructure milestone 2026-01-27 07:08:44 +00:00
maj added the configurationpriority:highinfrastructure labels 2026-01-27 07:08:44 +00:00
maj closed this issue 2026-01-28 18:13:34 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: maj/nextcloud-share#6