Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Waiting for postgres to actually run: perhaps this heips with running… #48

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ services:
POSTGRES_USER: 'brostar'
POSTGRES_PASSWORD: 'brostar'
POSTGRES_DB: 'brostar'
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- pgdata:/var/lib/postgresql/data

Expand All @@ -28,11 +33,11 @@ services:
command: celery -A brostar_api worker --loglevel=INFO
volumes:
- .:/code
links:
- redis
depends_on:
- db
- redis
db:
condition: service_healthy
redis:
condition: service_started

web:
environment:
Expand All @@ -45,16 +50,17 @@ services:
build: .
# command: "bin/gunicorn -b 0.0.0.0:${PORT:-5000} --workers=3 --timeout 90 --preload --max-requests=10000 trs.wsgi"
command: "python manage.py runserver 0.0.0.0:8000"
links:
- db
ports:
- "8000:8000"
volumes:
- .:/code
depends_on:
- db
- redis
- celery
db:
condition: service_healthy
redis:
condition: service_started
celery:
condition: service_started


volumes:
Expand Down