File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ export MAILER_PASSWORD=<mailer_password>
2222export FRONTEND_URL=<frontend_url>
2323export HTTP_PORT=5000
2424export GRPC_PORT=5001
25+ export INIT_DB=true
26+ export ENV=DEVELOPMENT
2527```
26283 . Install the protobuf-grpc compiler.
2729``` sh
Original file line number Diff line number Diff line change @@ -10,6 +10,12 @@ import (
1010func InitDb (ctx context.Context ) error {
1111
1212 logger := util .SharedLogger
13+
14+ if os .Getenv ("INIT_DB" ) != "true" {
15+ logger .Info ("initDb: skipping database initialization" )
16+ return nil
17+ }
18+
1319 conn , err := connection .PoolConn (ctx )
1420 if err != nil {
1521 logger .Error ("initDb: failed to get pool connection" , err )
Original file line number Diff line number Diff line change @@ -17,3 +17,4 @@ services:
1717 HTTP_PORT : 5000
1818 GRPC_PORT : 5001
1919 ENV : DEVELOPMENT
20+ INIT_DB : true
You can’t perform that action at this time.
0 commit comments