Skip to content

Commit 03a9671

Browse files
authored
fix: remove config volume mount from db container (#4579)
1 parent 7f1bb04 commit 03a9671

File tree

6 files changed

+0
-11
lines changed

6 files changed

+0
-11
lines changed

internal/db/reset/reset_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ func TestResetCommand(t *testing.T) {
3838

3939
t.Run("seeds storage after reset", func(t *testing.T) {
4040
utils.DbId = "test-reset"
41-
utils.ConfigId = "test-config"
4241
utils.Config.Db.MajorVersion = 15
4342
// Setup in-memory fs
4443
fsys := afero.NewMemMapFs()

internal/db/start/start.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ func NewHostConfig() container.HostConfig {
122122
RestartPolicy: container.RestartPolicy{Name: "always"},
123123
Binds: []string{
124124
utils.DbId + ":/var/lib/postgresql/data",
125-
utils.ConfigId + ":/etc/postgresql-custom",
126125
},
127126
}
128127
if utils.Config.Db.MajorVersion <= 14 {

internal/db/start/start_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ func TestStartDatabase(t *testing.T) {
5555
t.Run("initialize main branch", func(t *testing.T) {
5656
utils.Config.Db.MajorVersion = 15
5757
utils.DbId = "supabase_db_test"
58-
utils.ConfigId = "supabase_config_test"
5958
utils.Config.Db.Port = 5432
6059
// Setup in-memory fs
6160
fsys := afero.NewMemMapFs()
@@ -103,7 +102,6 @@ func TestStartDatabase(t *testing.T) {
103102
t.Run("recover from backup volume", func(t *testing.T) {
104103
utils.Config.Db.MajorVersion = 14
105104
utils.DbId = "supabase_db_test"
106-
utils.ConfigId = "supabase_config_test"
107105
utils.Config.Db.Port = 5432
108106
// Setup in-memory fs
109107
fsys := afero.NewMemMapFs()
@@ -316,7 +314,6 @@ func TestStartDatabaseWithCustomSettings(t *testing.T) {
316314
// Setup
317315
utils.Config.Db.MajorVersion = 15
318316
utils.DbId = "supabase_db_test"
319-
utils.ConfigId = "supabase_config_test"
320317
utils.Config.Db.Port = 5432
321318
utils.Config.Db.Settings.MaxConnections = cast.Ptr(uint(50))
322319

internal/start/start_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ func TestDatabaseStart(t *testing.T) {
120120
}
121121
// Start postgres
122122
utils.DbId = "test-postgres"
123-
utils.ConfigId = "test-config"
124123
utils.Config.Db.Port = 54322
125124
utils.Config.Db.MajorVersion = 15
126125
gock.New(utils.Docker.DaemonHost()).
@@ -230,7 +229,6 @@ func TestDatabaseStart(t *testing.T) {
230229
JSON(image.InspectResponse{})
231230
// Start postgres
232231
utils.DbId = "test-postgres"
233-
utils.ConfigId = "test-config"
234232
utils.Config.Db.Port = 54322
235233
utils.Config.Db.MajorVersion = 15
236234
gock.New(utils.Docker.DaemonHost()).

internal/stop/stop_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ func TestStopServices(t *testing.T) {
191191

192192
t.Run("removes data volumes", func(t *testing.T) {
193193
utils.DbId = "test-db"
194-
utils.ConfigId = "test-config"
195194
utils.StorageId = "test-storage"
196195
utils.EdgeRuntimeId = "test-functions"
197196
utils.InbucketId = "test-inbucket"
@@ -208,7 +207,6 @@ func TestStopServices(t *testing.T) {
208207

209208
t.Run("skips all filter when removing data volumes with Docker version pre-v1.42", func(t *testing.T) {
210209
utils.DbId = "test-db"
211-
utils.ConfigId = "test-config"
212210
utils.StorageId = "test-storage"
213211
utils.EdgeRuntimeId = "test-functions"
214212
utils.InbucketId = "test-inbucket"

internal/utils/config.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818
var (
1919
NetId string
2020
DbId string
21-
ConfigId string
2221
KongId string
2322
GotrueId string
2423
InbucketId string
@@ -64,7 +63,6 @@ func UpdateDockerIds() {
6463
NetId = GetId("network")
6564
}
6665
DbId = GetId(DbAliases[0])
67-
ConfigId = GetId("config")
6866
KongId = GetId(KongAliases[0])
6967
GotrueId = GetId(GotrueAliases[0])
7068
InbucketId = GetId(InbucketAliases[0])

0 commit comments

Comments
 (0)