services: app_base: &app_base image: marbas:local build: context: . dockerfile: Dockerfile env_file: - .env user: "${UID:-1000}:${GID:-1000}" volumes: - .:/app:z depends_on: db: condition: service_healthy migrations: <<: *app_base command: sh -c "python manage.py makemigrations && python manage.py migrate" import_sde: <<: *app_base command: python manage.py import_sde /app/static_eve/sde/fsd depends_on: migrations: condition: service_completed_successfully eveal: <<: *app_base ports: - "8000:8000" command: ["uvicorn", "marbas.asgi:application", "--host", "0.0.0.0", "--port", "8000", "--reload"] healthcheck: test: python manage.py health_check interval: 3s depends_on: redis: condition: service_healthy db: condition: service_healthy migrations: condition: service_completed_successfully import_sde: condition: service_completed_successfully worker: <<: *app_base command: celery -A marbas worker -l info depends_on: redis: condition: service_healthy db: condition: service_healthy migrations: condition: service_completed_successfully redis: image: redis:latest ports: - "6379:6379" healthcheck: test: redis-cli ping interval: 3s db: image: postgres:13-alpine ports: - "5432:5432" volumes: - marbas_dbdata:/var/lib/postgresql/data:Z env_file: - .env healthcheck: test: pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB} interval: 1s timeout: 3s retries: 10 # elasticsearch: # image: elasticsearch:latest # ports: # - "9200:9200" # environment: # - discovery.type=single-node # - cluster.name=elasticsearch # - bootstrap.memory_lock=true # - "ES_JAVA_OPTS=-Xms512m -Xmx512m" # healthcheck: # test: curl -s http://elasticsearch:9200 >/dev/null || exit 1 # interval: 10s # timeout: 3s # retries: 3 volumes: marbas_dbdata: