Read website deployment configuration from repository #8

Closed
opened 2022-11-12 12:58:49 +05:30 by realaravinth · 2 comments
Owner

Similar to Codeberg Pages' .domains

Supported File formats:

  • Toml
  • JSON
  • yaml

Configuration Parameters

domains = [
    "example.org",
    "example.com",
]

redirects = [
	{from = "/from1", to = "/to1"},
	{from = "/from2", to = "/to2"},
]

[source]
production_branch = "librepages"
staging = "beta" # staging branch

[forms]
enable = true # https://git.batsense.net/LibrePages/forms

[image_compression]
enable = true # WIP image service
Similar to Codeberg Pages' ` .domains` ## Supported File formats: - Toml - JSON - yaml ## Configuration Parameters ```toml domains = [ "example.org", "example.com", ] redirects = [ {from = "/from1", to = "/to1"}, {from = "/from2", to = "/to2"}, ] [source] production_branch = "librepages" staging = "beta" # staging branch [forms] enable = true # https://git.batsense.net/LibrePages/forms [image_compression] enable = true # WIP image service ```
realaravinth added spent time 2022-11-12 12:58:57 +05:30
3 hours
Author
Owner

Wrote a library, isolated from the main program a while ago:

12:57 atm@lab libconfig ±|master ✗|→ stat src/lib.rs 
  File: src/lib.rs
  Size: 3788      	Blocks: 8          IO Block: 4096   regular file
Device: 259,1	Inode: 29886389    Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1001/     atm)   Gid: ( 1001/     atm)
Access: 2022-11-12 12:55:40.066285052 +0530
Modify: 2022-11-04 17:26:29.440732634 +0530
Change: 2022-11-04 17:26:29.440732634 +0530
 Birth: 2022-11-04 17:26:29.440732634 +0530

Must integrate it into the program and switch to reading files from Git repository.

Wrote a library, isolated from the main program a while ago: ```bash 12:57 atm@lab libconfig ±|master ✗|→ stat src/lib.rs File: src/lib.rs Size: 3788 Blocks: 8 IO Block: 4096 regular file Device: 259,1 Inode: 29886389 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1001/ atm) Gid: ( 1001/ atm) Access: 2022-11-12 12:55:40.066285052 +0530 Modify: 2022-11-04 17:26:29.440732634 +0530 Change: 2022-11-04 17:26:29.440732634 +0530 Birth: 2022-11-04 17:26:29.440732634 +0530 ``` Must integrate it into the program and switch to reading files from Git repository.
realaravinth self-assigned this 2022-11-12 13:03:44 +05:30
realaravinth started working 2022-11-12 13:05:54 +05:30
Author
Owner

Changes live in feat-config branch.

DIff: 3a961bc524..b07f076634

Summary

  1. Optional Toml/Yaml/Json configuration (for schema see issue description for every website deployment
  2. Report 404 when file is not found in Git repository; used to panic and crash.
  3. Read configuration on every deployment and update event.

Merging into wip-dashboard branch

Changes live in [`feat-config`](https://git.batsense.net/LibrePages/librepages/src/branch/feat-config) branch. DIff: https://git.batsense.net/LibrePages/librepages/compare/3a961bc52417edcf907a64c80b3be82a5b565184..b07f0766340a6891b5fec1d68df6602cf718feb7 ## Summary 1. Optional Toml/Yaml/Json configuration (for schema see issue description for every website deployment 2. Report 404 when file is not found in Git repository; used to panic and crash. 3. Read configuration on every deployment and update event. --- Merging into `wip-dashboard` branch
realaravinth stopped working 2022-11-12 15:57:11 +05:30
2 hours 51 minutes
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Total Time Spent: 5 hours 51 minutes
realaravinth
5 hours 51 minutes
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: LibrePages/librepages#8
No description provided.