Make the hosting layout a value, not a literal in allod site #165
Labels
No labels
blocked
bug
decision
duplicate
enhancement
help wanted
invalid
landed?
question
ready-to-merge
stale
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/tools#165
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Stop hardcoding one hosting product's directory layout into
allod site, so a second deployment on different hosting is a value rather than a fork of the command.Primary goals:
domains/<domain>/public_htmlis DirectAdmin's layout, not a fact about static sites, and it is currently a string literal in the command.Current state and specifics
Two DirectAdmin-specific facts are compiled in:
cmd/allod/site.go:443builds the destination as<remote>:domains/<domain>/public_html./.well-known/**,/.htaccess,/stats/**and/cgi-bin/**.Both are correct for the hosting this was written against and wrong for hosting that puts a docroot at
public_html/<domain>orwww/<domain>, or that answers ACME from elsewhere. Because the command writes the filter itself, a deployment cannot override either without changing this repository.That was the right trade when there was one consumer, and it is worth naming as a deliberate debt rather than discovering it when a second one appears. The trigger for doing this work is a second deployment whose hosting layout differs; until then the defaults are the only values in use and the cost of the abstraction is not yet paid for.
Where the values should live is the open question. A hosting-profile name selecting a built-in set keeps site repositories at one line and keeps the list central. Putting the layout in each site's
site.tomlwould return the exclusion list to N copies, which is the failure this design exists to prevent, so it is the wrong answer even though it is the obvious one.Scope
In: how a deployment selects a hosting layout, and where the docroot pattern and exclusion list live once they are no longer literals.
Out: adding a second backend to rclone's invocation, and any change to what the exclusion list contains for DirectAdmin. Marked exploratory: the shape should be decided against a real second consumer rather than invented ahead of one.