mirror of
https://github.com/viq/NewsBlur.git
synced 2025-11-01 09:09:16 +00:00
add entrypoint.sh for newsblur_web and healthcheck for postgres
This commit is contained in:
parent
b38daf7bd6
commit
519d4232fc
2 changed files with 10 additions and 1 deletions
|
|
@ -25,7 +25,7 @@ services:
|
|||
expose:
|
||||
- 8000
|
||||
# only use gunicorn if the TEST env variable is not "True"
|
||||
command: bash -c 'if [[ -z "${TEST}" && "${TEST}" = "True" ]] ; then echo "starting test env"; else gunicorn --bind :8000 newsblur_web.wsgi:application; fi'
|
||||
entrypoint: newsblur_web/entrypoint.sh
|
||||
volumes:
|
||||
- app-files:/srv/newsblur
|
||||
|
||||
|
|
@ -56,6 +56,11 @@ services:
|
|||
environment:
|
||||
- POSTGRES_USER=newsblur
|
||||
- POSTGRES_PASSWORD=newsblur
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
ports:
|
||||
- 5434:5432
|
||||
volumes:
|
||||
|
|
|
|||
4
newsblur_web/entrypoint.sh
Normal file
4
newsblur_web/entrypoint.sh
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
if [[ -z "${TEST}" && "${TEST}" = "True" ]]
|
||||
then echo "starting test env"
|
||||
else gunicorn --bind :8000 newsblur_web.wsgi:application
|
||||
fi
|
||||
Loading…
Add table
Reference in a new issue