If I have already committed code where my vault.yml files were unencrypted (default trellis-cli state), can I retroactively encrypt my vault.yml files, then recommit the code? What’s the best way to do this to remove any trace of the plaint text secrets? What Git command can I use to rewrite the Git History of the repo and have the current code base (after encrypting vault.yml files) be the first and only commit?
Second Question:
If I’m using Digital Ocean as my host, can a Staging environment AND a Production environment be provisioned on the same droplet (IP Address). It seems the command trellis droplet create staging creates a entirely new droplet. Is that the common workflow with a staging and production environment, each hosted on a different droplet, but connected to different branches of the Git Repository?
Yeah that’s our default recommendation. It is possible to run multiple environments on the same server though I wouldn’t recommend it since that kind of defeats the purpose of a staging server!
Awesome Thank you! I’ll probably just redo the repo and start fresh since Trellis makes it all so easy. One issue when I deployed my Staging Environment was accessing the site by the IP address wasn’t possible. I even changed my /etc/hosts file to the server IP example.com, but I still couldn’t access the site by the domain example.com.