Gitpod: wait for postgresql to be listening before startup (#15429)
* Wait for postgresql to be listening on port before setup and startup https://github.com/forem/forem/issues/15428 points out an issue where the command sequence runs (foreman starts the Procfile.dev) but rails exits early because the database is not up. Await the db port before proceeding. * Await database in gitpod before starting up * Move await-port to before: action see https://www.gitpod.io/docs/config-start-tasks - init is only run as needed (prebuild, new workspace) once, before is run every time a workspace starts or restarts. * When in doubt, sleep
This commit is contained in:
parent
9687760056
commit
7c540abc8d
1 changed files with 4 additions and 1 deletions
|
|
@ -13,7 +13,10 @@ ports:
|
|||
|
||||
tasks:
|
||||
- name: Forem Server
|
||||
before: redis-server &
|
||||
before: >
|
||||
redis-server &
|
||||
gp await-port 5432 &&
|
||||
sleep 1
|
||||
init: ./gitpod-init.sh
|
||||
command: bin/startup
|
||||
- name: Open Site
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue