Skip to content

Commit 472d649

Browse files
authored
Create examples directory, and add example of external databases (#1316)
<!-- description here --> ### Checklist <!-- Kubernetes and Docker Compose MUST be kept in sync. You should not merge a change here without a corresponding change in the other repository, unless it truly is specific to this repository. If uneeded, add link or explanation of why it is not needed here. --> * [ ] Sister [deploy-sourcegraph](https://github.com/sourcegraph/deploy-sourcegraph) change: * [ ] Sister [customer-replica](https://github.com/sourcegraph/deploy-sourcegraph-docker-customer-replica-1) change (if necessary, for any changes affecting pure-docker or configuration): * [ ] All images have a valid tag and SHA256 sum ### Test plan Doc update <!-- As part of SOC2/GN-104 and SOC2/GN-105 requirements, all pull requests are REQUIRED to provide a "test plan". A test plan is a loose explanation of what you have done or implemented to test this, as outlined in our Testing principles and guidelines: https://docs.sourcegraph.com/dev/background-information/testing_principles Write your test plan here after the "Test plan" header. -->
1 parent 5920521 commit 472d649

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Docker Compose override example of how to configure external databases
2+
3+
x-env-vars-database: &env-vars-database
4+
5+
CODEINSIGHTS_PGDATABASE: sg
6+
CODEINSIGHTS_PGDATASOURCE: ""
7+
CODEINSIGHTS_PGHOST: codeinsights.postgres.example.com
8+
CODEINSIGHTS_PGPASSWORD: super_long_secure_password
9+
CODEINSIGHTS_PGPORT: 5432
10+
CODEINSIGHTS_PGSSLMODE: require
11+
CODEINSIGHTS_PGUSER: sg
12+
13+
CODEINTEL_PGDATABASE: sg
14+
CODEINTEL_PGDATASOURCE: ""
15+
CODEINTEL_PGHOST: codeintel.postgres.example.com
16+
CODEINTEL_PGPASSWORD: super_long_secure_password
17+
CODEINTEL_PGPORT: 5432
18+
CODEINTEL_PGSSLMODE: require
19+
CODEINTEL_PGUSER: sg
20+
21+
PGDATABASE: sg
22+
PGDATASOURCE: ""
23+
PGHOST: pgsql.postgres.example.com
24+
PGPASSWORD: super_long_secure_password
25+
PGPORT: 5432
26+
PGSSLMODE: require
27+
PGUSER: sg
28+
29+
# Uncomment if using AWS RDS with IAM authentication
30+
# PG_CONNECTION_UPDATER: EC2_ROLE_CREDENTIALS
31+
# AWS_STS_REGIONAL_ENDPOINTS: regional
32+
33+
34+
services:
35+
36+
migrator:
37+
depends_on: !reset [] # Remove the dependency on the built-in Postgres databases
38+
environment: !override
39+
<<: *env-vars-database
40+
41+
sourcegraph-frontend-0:
42+
environment:
43+
<<: *env-vars-database
44+
45+
sourcegraph-frontend-internal:
46+
depends_on: !override
47+
migrator:
48+
condition: service_completed_successfully
49+
environment:
50+
<<: *env-vars-database
51+
52+
53+
# Disable built-in databases
54+
codeinsights-db-exporter: !reset {}
55+
codeinsights-db: !reset {}
56+
codeintel-db-exporter: !reset {}
57+
codeintel-db: !reset {}
58+
pgsql-exporter: !reset {}
59+
pgsql: !reset {}

0 commit comments

Comments
 (0)