File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
framework/components/postgres Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ const (
2121 Port = "5432"
2222 ExposedStaticPort = "13000"
2323 Database = "chainlink"
24+ DatabaseDir = "postgresql_data"
2425)
2526
2627type Input struct {
@@ -92,6 +93,8 @@ func NewPostgreSQL(in *Input) (*Output, error) {
9293 if err != nil {
9394 return nil , err
9495 }
96+ _ = os .RemoveAll (filepath .Join (wd , DatabaseDir ))
97+ _ = os .Mkdir (DatabaseDir , os .ModePerm )
9598 req .HostConfigModifier = func (h * container.HostConfig ) {
9699 h .PortBindings = nat.PortMap {
97100 nat .Port (bindPort ): []nat.PortBinding {
@@ -104,7 +107,7 @@ func NewPostgreSQL(in *Input) (*Output, error) {
104107 h .Mounts = []mount.Mount {
105108 {
106109 Type : mount .TypeBind ,
107- Source : filepath .Join (wd , "postgresql_data" ),
110+ Source : filepath .Join (wd , DatabaseDir ),
108111 Target : "/var/lib/postgresql/data" ,
109112 },
110113 }
You can’t perform that action at this time.
0 commit comments