Hey folks, I’ve been digging into a glitch / ghost blog setup and picked up a few questions along the way about how instantiation for project containers works and / or best practices for getting more advanced. I’m thinking about writing a small guide so I wanted to get the right answers for these things:
Container lifecycle:
- I gather that
init.sh
is run when the container starts up. Since things are backed by git, I imagine there’s a checkout step, theninit.sh
. What else happens during startup? Any way to tie into container shutdown?
Persistent data:
- Since everything is backed by git, does that mean I can safely change and commit files using the command line? Any gotchas or subtly different behavior than normal git? What happens to uncommitted changes when a container shuts down?
- Since everything can be remixed, best practices for non-remixable data is keeping things in
.env
(totally private) or.data
(not remixed but not private)? - I’ve seen the warning that persistent data should be in
.data
, I’m guessing this is mostly for app-level data that isn’t git-friendly. When is this added to the container? Sort of related to my lifecycle question above.
That’s probably enough to start. I’ll keep digging around for answers.