insights: reinstate code insights option in single docker deployment
Created by: leonore
closes #38011 (closed)
we can't simply add the code insights database to the list of schemas because this means the db will get created regardless of whether or not the env var ALLOW_SINGLE_DOCKER_CODE_INSIGHTS
is enabled or not. instead, we add it to the list only if the env var is enabled. this was the issue for a customer here: https://github.com/sourcegraph/customer/issues/991
Test plan
Tested out the docker image through buildkite using sg ci build main-dry-run
: https://buildkite.com/sourcegraph/sourcegraph/builds/164801#01825e85-9af1-45d1-a3ff-f320ce3338fa. going through the logs shows that we do not run the migrations for the codeinsights database.
Ran backend integration tests through main-dry-run
branch to make sure the integration tests are OK: https://buildkite.com/sourcegraph/sourcegraph/builds/164854