Skip to content

Commit

Permalink
Merge branch 'main' into gad-4
Browse files Browse the repository at this point in the history
  • Loading branch information
akshatnema committed Mar 26, 2023
2 parents b1482e1 + 195e713 commit ee8f6be
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Apply database migrations
echo "Apply database migrations"
# python FusionIIIT/manage.py makemigrations
python FusionIIIT/manage.py migrate
# python FusionIIIT/manage.py migrate

# Start server
echo "Starting server"
Expand Down
12 changes: 10 additions & 2 deletions scripts/script.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ var branchPorts = map[string]Ports{
"sa-4": {App: 8018, Db: 5468},
"hr": {App: 8020, Db: 5469},
"rspc": {App: 8021, Db: 5470},
"ps-1": {App: 8022, Db: 5471},
"ps-2": {App: 8023, Db: 5472},
}

func main() {
Expand Down Expand Up @@ -115,7 +117,7 @@ func main() {
cmdRun(fmt.Sprintf("docker-compose -f %s up -d", filepath.Join(branchDir, "docker-compose.yml")), true)

if len(*db_dumpPath) > 0 {
fmt.Printf("Importing dump into %s_db_1\n", branch)
fmt.Printf("Importing dump into %s_db_1\n", branch)
cmdRun(
fmt.Sprintf(
"docker exec -i %s_db_1 psql -U fusion_admin -d fusionlab < %s",
Expand All @@ -125,6 +127,13 @@ func main() {
true)
}

cmdRun(
fmt.Sprintf(
"docker exec -i %s_app_1 python FusionIIIT/manage.py migrate",
branch,
),
true)

fmt.Printf("%s app started at port %d\n", branch, branchPorts[branch].App)
}
}
Expand Down Expand Up @@ -276,4 +285,3 @@ func CopySymLink(source, dest string) error {
}
return os.Symlink(link, dest)
}

0 comments on commit ee8f6be

Please sign in to comment.