Testing and production environment ideas? (and .gitignore)

Hey,

I’m trying to create a testing environment for development before pushing to a production environment. I want to be able to bring up a (hopefully identical) test instance to develop locally on my laptop.

I have done this up until now using Docker compose with a .env file for passing it environment variables (it’s awesome) and some fiddling of config files - this is getting ever more difficult though as I add more to the system.

Found some discussion of this a year ago, was wondering if anyone had any further ideas?

https://www.reddit.com/r/homeassistant/comments/76lwsv/dev_testing_before_production/

There is also the issue of which config files to have and which to .gitignore - do you commit your known_devices.yaml or core.entity_registry for example?

Any thoughts appreciated!

one of the best/easiest way to achieve this is with docker. You can create multiple containers (=copies) and run your tests. You probably shouldn’t run 2 HA containers simultaneously though as you may experience issues, especially with resources that require dedicated access (like a serial port), but it’s so easy to take prod down and bring test up…