Skip to content

Commit

Permalink
docker-compose: auto build indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
DonHaul authored and drjova committed Aug 13, 2024
1 parent aecd899 commit 5a7c8df
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,20 @@ services:
dockerfile: Dockerfile
image: backoffice_local_django
depends_on:
- postgres-backoffice
- redis
redis:
condition: service_started
postgres-backoffice:
condition: service_started
opensearch:
condition: service_healthy
volumes:
- ./backoffice:/app:z
env_file:
- ./backoffice/.envs/local/.django
- ./backoffice/.envs/local/.postgres
ports:
- "8000:8000"
command: sh -c 'poetry run python manage.py migrate && poetry run python manage.py runserver 0.0.0.0:8000'
command: sh -c 'poetry run python manage.py migrate && poetry run python manage.py opensearch index create --force && poetry run python manage.py runserver 0.0.0.0:8000'

postgres-airflow:
image: postgres:13
Expand Down Expand Up @@ -170,6 +174,11 @@ services:
mem_limit: 2g
ports:
- "9200:9200"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200"]
interval: 30s
timeout: 10s
retries: 5

airflow-webserver:
<<: *airflow-common
Expand Down

0 comments on commit 5a7c8df

Please sign in to comment.