Merged
Conversation
Will allow new wrappers while allowing existing vhosts to be deployed without changes to the JSON.
sagepe
reviewed
Mar 24, 2026
Member
Author
|
@sagepe I've pushed a couple of fixups and an extra commit which adds an option to chdir before the wrapper is executed. Tested on staging and this works with the old style JSON and the new version: diff --git a/deployments/vhosts/alaveteli/staging.alaveteli.org.json b/deployments/vhosts/alaveteli/staging.alaveteli.org.json
index de7a809d9..af6814900 100644
--- a/deployments/vhosts/alaveteli/staging.alaveteli.org.json
+++ b/deployments/vhosts/alaveteli/staging.alaveteli.org.json
@@ -29,11 +29,11 @@
"foi-staging-secondary"
],
"email": {
- "foistaging": {
- "": "bin/rails.sh action_mailbox:ingress:exim URL=https://staging.alaveteli.org/rails/action_mailbox/relay/inbound_emails INGRESS_PASSWORD=123",
- "team": "script/handle-mail-replies",
- "track": "script/handle-mail-replies"
- }
+ "foistaging": [
+ { "suffix": "", "script": "bin/rails action_mailbox:ingress:exim URL=https://staging.alaveteli.org/rails/action_mailbox/relay/inbound_emails INGRESS_PASSWORD=123", "wrapper": "rbenv_exec" },
+ { "suffix": "team", "script": "script/handle-mail-replies", "wrapper": "rbenv" },
+ { "suffix": "track", "script": "script/handle-mail-replies", "wrapper": "rbenv" }
+ ]
},
"exec_before_down": {
"user": [ |
sagepe
approved these changes
Apr 7, 2026
Member
|
I think this all looks good @gbp - can you squash the fixups, etc, so this is good to merge and we can get it into a release with another small change I'm working on. |
Script added in 9306ba5105cbdd9ed71bf72754e8b5dc9956e1fe
Going to allow this variable to be an array in future commits.
Allow JSON to be more explicit instead of automatically prefixing
Exim forward pipes with the `run-with-rbenv-path` wrapper.
New format would look like:
```
{
"email": {
"email-user": [
{ "script": "path/to/default/script", "suffix": "" },
{ "script": "path/to/suffix/script", "suffix": "suffix" },
{ "script": "path/to/ruby/script", "suffix": "ruby", "wrapper": "rbenv" }
]
}
}
```
rbenv_exec requires the working directory to be set to the vcspath for proper rbenv and bundler resolution.
1c9d93d to
dba4992
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow JSON to be more explicit instead of automatically prefixing Exim forward pipes with the
run-with-rbenv-pathwrapper.New format would look like:
This will allow us to set the script to
bin/rails actionmailbox:..., using the new "rbenv_exec" wrapper. The old doesn't allow this as it callssourceinstead ofexec.