Skip to content

Commit 648136f

Browse files
committed
Add example showing external databases
1 parent 5920521 commit 648136f

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)