-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature/EVG-191: Fix server not listening on the correct interface (#57)
* split up entrypoint into separate scripts for each env, use roarr logging framework * bind on 0.0.0.0 to listen on all interfaces * run npm in test and ci environments in shell, remove production configs * remove prod entrypoint * simply docker-compose exec syntax for CI * add -T to exec command * convert more console.log to debugging framework * try only running functional tests * use sh to run tests in CI * convert more console.log to debugging framework * convert more console.log to debugging framework * try only running unit tests * print free memory between test runs * run tests outside of bin/sh * wait for app to be running before executing tests * print docker-compose service status and run wait4ports in separate container * use entrypoints scripts to wait for services, start app detached using run in CI * rename prod.sh to ci-after-db.sh and ci.sh to ci-after-app.sh * run app in CI with NODE_ENV=production * run app and tests in different containers in CI to avoid hostname overrides * expose app environment variables to app env in CI * run migrations in ci-after-db.sh * give app more time to start in CI * start tests in CI without recreating app container * give the ephemeral app container a fixed name in CI * start app in CI using up -d * add command npm start to app in CI
- Loading branch information
1 parent
882b2e6
commit 6af2d80
Showing
30 changed files
with
659 additions
and
196 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 |
---|---|---|
@@ -1 +1,3 @@ | ||
node_modules | ||
.git | ||
Dockerfile |
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
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
wait4ports -t 3 "tcp://everglot-db:5432" | ||
wait4ports -t 10 "tcp://everglot-app:3000" | ||
|
||
exec "$@" |
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,8 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
wait4ports -t 10 "tcp://everglot-db:5432" | ||
|
||
npm run migrate up | ||
|
||
exec "$@" |
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,10 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
wait4ports "tcp://everglot-db:5432" | ||
|
||
# Note: Migrations should be run manually in development! | ||
# Run them using: | ||
# PGHOST=localhost PGDATABASE=everglot_app_db PGUSER=everglot_app_user PGPASSWORD=everglot_app_pass docker-compose -f docker-compose.yml -f docker-compose.dev.yml exec everglot-app "npm run migrate up" | ||
|
||
exec "$@" |
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,8 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
wait4ports -t 5 "tcp://everglot-db:5432" | ||
|
||
npm run migrate up | ||
|
||
exec "$@" |
Oops, something went wrong.