Mount bash_history to persist it among containers#635
Mount bash_history to persist it among containers#635alexandrajulius wants to merge 8 commits intoinviqa:1.6.xfrom
Conversation
|
I realised now that with my advice from yesterday, this won't survive harness updates ( Perhaps it should end up being stored in the project root and added to the various application/skeleton/.gitignore files? |
|
good point, we can certainly do that on Teufel, but where should i add it (empty .bash_history + .gitignore entry) to provide it in skeletons for new projects? |
andytson-inviqa
left a comment
There was a problem hiding this comment.
still needs gitignoring
.gitignore
Outdated
| /tests/ | ||
| /tmp-test/ | ||
| .idea | ||
| .bash_history |
There was a problem hiding this comment.
sorry, not that file, all the others in the skeleton directories
There was a problem hiding this comment.
Ah nice :) I see where the skeletons are. Will revert this, and add to the other gitignores
There was a problem hiding this comment.
hmm we'll have another problem if the file has to exist, as tho the skeleton will be there on ws create, the file wont on any other person's clones
There was a problem hiding this comment.
I think you're right though, just we'd need to create the file some other way
There was a problem hiding this comment.
actually it wouldn't help on the ws create either.
It'd be something like the enable.sh running touch .bash_history
There was a problem hiding this comment.
otherwise if the file doesn't already exist, docker-compose would create a directory and bind that to the container, which isn't what we'd want
There was a problem hiding this comment.
yes, that's what docker-compose does... i can add touch .bash_history to
src/_base/harness/config/events.yml
after('harness.install'): |
#!bash
ws enable
but then the file does not survive a refresh/install? I think it's better than not having it tho.
Alternatively people would have to create that file manually in their project root. Which is weird i think
There was a problem hiding this comment.
I'd suggest https://github.com/inviqa/harness-base-php/blob/995a60cf25b378708c812ff8b926829c39d825c8/src/_base/harness/scripts/enable.sh.twig rather than the after event itself.
The file will survive in this way, as touch only creates the file if it doesn't exist
| initial_start | ||
|
|
||
| touch .my127ws/.flag-built | ||
| touch .bash_history |
|
Hi! Any updates on this PR? |
|
@kierenevans @andytson-inviqa is there any missing work to be done in this PR? I just wonder why it was postpone that much, because it's already half a year open without any new feedback 🤔 |
|
@Chemaclass Unfortunately it's making the .bash_history as a directory via docker-compose: I'll try to fix |
…ll make a directory
f113e7f to
80d5917
Compare
This should solve the following issue
#627