Skip to content

Commit 8309f18

Browse files
committed
Adding migrator operations
1 parent 6778cd7 commit 8309f18

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
## Overrides for services defined in the base docker-compose.yaml files
2+
services:
3+
4+
migrator:
5+
6+
################################################################################
7+
# Normal startup of migrator should only ever use the default "up" command, no additional args
8+
# Overriding the command should only to be used to make specific changes, on single startups, only when needed, only when directed by Sourcegraph Customer Support Engineering
9+
# If you find that your migrator needs (an) additional arg(s) to run, there's something wrong with your databases; please open a support ticket by emailing [email protected]
10+
command: ["up"]
11+
################################################################################
12+
13+
14+
################################################################################
15+
# Initializing new databases
16+
17+
# AWS RDS, and some other DMBSs require super admin permissions to install some of the extensions that Sourcegraph requires, ex. pg_stat_statements
18+
19+
# Install the needed extensions by running these queries, as an admin user, against their respective databases
20+
# https://github.com/sourcegraph/artifacts/blob/main/migrations/frontend/1680296731_squashed_migrations_privileged/up.sql
21+
# https://github.com/sourcegraph/artifacts/blob/main/migrations/codeintel/1679010276_squashed_migrations_privileged/up.sql
22+
# https://github.com/sourcegraph/artifacts/blob/main/migrations/codeinsights/1675347548_squashed_migrations_privileged/up.sql
23+
24+
# After the extensions are successfully installed, manually mark these migrations as completed,
25+
# by uncommenting these commands, one at a time, and running `docker compose up migrator` each time,
26+
# then comment the last one out, and run the normal `docker compose up -d --remove-orphans` command, for a normal startup
27+
# command: ["add-log", "-db=frontend", "-version=1680296731"]
28+
# command: ["add-log", "-db=codeintel", "-version=1679010276"]
29+
# command: ["add-log", "-db=codeinsights", "-version=1675347548"]
30+
################################################################################
31+
32+
33+
################################################################################
34+
# Multi-version upgrades
35+
# See https://sourcegraph.com/docs/admin/deploy/docker-compose/upgrade#multi-version-upgrades
36+
# command: ["upgrade", "--from=v6.4.0", "--to=v6.9.1277"]
37+
38+
# Do not skip the drift check, or use other args, without instruction from Sourcegraph Customer Support Engineering
39+
# If migrator fails to start up due to drift detected, or other issues, please open a support ticket by emailing [email protected]
40+
################################################################################

0 commit comments

Comments
 (0)