-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #250 from yahu1031/windows_table_setup
feat: Windows table setup
- Loading branch information
Showing
3 changed files
with
39 additions
and
14 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
templates/serverpod_templates/projectname_server/setup-tables.cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
@echo off | ||
|
||
@REM Start docker | ||
echo Starting docker | ||
docker-compose up --build --detach | ||
|
||
:LOOP | ||
netstat -o -n -a | >nul findstr "8090" && ( | ||
echo Waiting for Postgres... | ||
sleep 2 | ||
goto :PORT_FOUND | ||
) | ||
echo Waiting for Postgres... | ||
goto :LOOP | ||
|
||
:PORT_FOUND | ||
echo Postgres is ready | ||
cat .\generated\tables-serverpod.pgsql | docker-compose run -T postgres env PGPASSWORD="DB_PASSWORD" psql -h postgres -U postgres -d projectname | ||
echo Stopping docker | ||
docker-compose stop | ||
|
||
exit /b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters