kopia lustrzana https://github.com/OpenDroneMap/WebODM
Added wait-for-postgres, changed docker-compose files
rodzic
30a0ddb374
commit
17621e39b2
|
@ -1,6 +1,6 @@
|
|||
version: '2'
|
||||
services:
|
||||
webapp:
|
||||
entrypoint: /bin/bash -c "chmod +x /webodm/*.sh && /bin/bash -c \"/webodm/wait-for-it.sh db:5432 -- /webodm/start.sh --create-default-pnode --setup-devenv\""
|
||||
entrypoint: /bin/bash -c "chmod +x /webodm/*.sh && /bin/bash -c \"/webodm/wait-for-postgres.sh db /webodm/start.sh --create-default-pnode --setup-devenv\""
|
||||
volumes:
|
||||
- .:/webodm
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
version: '2'
|
||||
services:
|
||||
webapp:
|
||||
entrypoint: /bin/bash -c "chmod +x /webodm/*.sh && /bin/bash -c \"/webodm/wait-for-it.sh db:5432 -- /webodm/start.sh --create-default-pnode\""
|
||||
entrypoint: /bin/bash -c "chmod +x /webodm/*.sh && /bin/bash -c \"/webodm/wait-for-postgres.sh db /webodm/start.sh --create-default-pnode\""
|
||||
depends_on:
|
||||
- node-odm-1
|
||||
node-odm-1:
|
||||
|
|
|
@ -17,7 +17,7 @@ services:
|
|||
webapp:
|
||||
image: opendronemap/webodm_webapp
|
||||
container_name: webapp
|
||||
entrypoint: /bin/bash -c "chmod +x /webodm/*.sh && /bin/bash -c \"/webodm/wait-for-it.sh db:5432 -- /webodm/start.sh\""
|
||||
entrypoint: /bin/bash -c "chmod +x /webodm/*.sh && /bin/bash -c \"/webodm/wait-for-postgres.sh db /webodm/start.sh\""
|
||||
volumes:
|
||||
- ${WO_MEDIA_DIR}:/webodm/app/media
|
||||
ports:
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
host="$1"
|
||||
shift
|
||||
cmd="$@"
|
||||
|
||||
until psql -h "$host" -U "postgres" -c '\q'; do
|
||||
>&2 echo "Postgres is unavailable - sleeping"
|
||||
sleep 1
|
||||
done
|
||||
|
||||
>&2 echo "Postgres is up - executing command"
|
||||
exec $cmd
|
Ładowanie…
Reference in New Issue