-
Notifications
You must be signed in to change notification settings - Fork 45
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 #363 from arturtamborski/local-setup-with-remote-db
Local setup with remote db
- Loading branch information
Showing
7 changed files
with
195 additions
and
11 deletions.
There are no files selected for viewing
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,7 @@ | ||
export SECRET_KEY=codeforpoznan | ||
export DB_HOST=db | ||
export DB_PORT=5432 | ||
export DB_NAME=cfp_v3 | ||
export DB_USER=cfp_v3 | ||
export DB_PASSWORD=cfp_v3 | ||
|
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 |
---|---|---|
|
@@ -12,3 +12,5 @@ __pycache__/ | |
*.coverage | ||
htmlcov/ | ||
.DS_Store | ||
.envrc | ||
|
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
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 |
---|---|---|
@@ -1,6 +1,11 @@ | ||
#!/bin/bash | ||
|
||
wait-for-it "${DB_HOST}:${DB_PORT:-5432}" | ||
# https://github.com/docker/for-linux/issues/264 | ||
getent hosts host.docker.internal >/dev/null || \ | ||
echo "$(ip route list match 0/0 | cut -d' ' -f3) host.docker.internal" \ | ||
| tee -a /etc/hosts >/dev/null | ||
|
||
wait-for-it "${DB_HOST}:${DB_PORT}" | ||
flask db migrate | ||
flask db upgrade | ||
flask run --host=0.0.0.0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
#!/bin/bash | ||
|
||
# https://github.com/docker/for-linux/issues/264 | ||
getent hosts host.docker.internal >/dev/null || \ | ||
echo "$(ip route list match 0/0 | cut -d' ' -f3) host.docker.internal" \ | ||
| tee -a /etc/hosts >/dev/null | ||
|
||
yarn install | ||
yarn serve --host 0.0.0.0 |