How do you guys manage switching between your dev ...
# best-practices
i
How do you guys manage switching between your dev database and prod database when deploying to production (as in target-your_load_db)? Do you typically just set a different env variable? Like if you have
TARGET_SNOWFLAKE_DATABASE='DEV'
set in your .env, do you just set a different env var in your prod environment to specify
TARGET_SNOWFLAKE_DATABASE='PROD'
? Is this something that should be handled by specifying the different config under a different environment in the
meltano.yml
? Is that a better practice? If so - how do you set the default env to prod once you deploy?
a
Yes, pretty much. When working locally and I want to test different envs, I use vscode with the envswitcher extention, it basically rewrites your
.env
file with content from other files like
.env.prod
.<http://env.dev|env.dev>
etc. But I couldn't tell you if this is anywhere near 'best practice', it just gets the job done for me.
🙌 1
i
I'm using CI/CD scripts to deploy - Github actions wrap up to a tgz archive - copy it to an S3 storage and deploying from there and injecting the variables with doppler.com . To deploy the system itself I use ansible and terraform.