name: carrot-mapper-sample-compose x-airflow-common: &airflow-common depends_on: db: condition: service_started minio: condition: service_started api: condition: service_healthy environment: &airflow-common-env AIRFLOW__CORE__EXECUTOR: LocalExecutor AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql+psycopg2://postgres:postgres@db:5432/postgres?options=-csearch_path%3Dairflow AIRFLOW__DATABASE__SQL_ALCHEMY_SCHEMA: airflow AIRFLOW__CORE__LOAD_EXAMPLES: "false" AIRFLOW__WEBSERVER__EXPOSE_CONFIG: "False" AIRFLOW__WEBSERVER__WEB_SERVER_PORT: 8080 AIRFLOW__WEBSERVER__SECRET_KEY: secret AIRFLOW__API__AUTH_BACKEND: airflow.api.auth.backend.basic_auth AIRFLOW_CONN_POSTGRES_DB_CONN: postgresql+psycopg2://postgres:postgres@db:5432/postgres STORAGE_TYPE: minio AIRFLOW_VAR_MINIO_ENDPOINT: http://minio:9000 AIRFLOW_VAR_MINIO_ACCESS_KEY: minioadmin AIRFLOW_VAR_MINIO_SECRET_KEY: minioadmin services: db: image: postgres:14 restart: always ports: - 5432:5432 environment: POSTGRES_PASSWORD: postgres POSTGRES_DB: postgres POSTGRES_USER: postgres volumes: - db_data:/var/lib/postgresql/data omop-lite: image: ghcr.io/health-informatics-uon/omop-lite volumes: - ./vocabs:/vocabs depends_on: - db environment: DB_PASSWORD: postgres DB_NAME: postgres SCHEMA_NAME: omop DATA_DIR: vocabs SYNTHETIC: true frontend: image: ghcr.io/health-informatics-uon/carrot/frontend:${RELEASE_VERSION} command: node server.js ports: - 3000:3000 environment: BACKEND_URL: http://api:8000 BACKEND_ORIGIN: localhost:8000 NEXTAUTH_URL: http://localhost:3000/ NEXTAUTH_SECRET: verycomplexsecretkey NEXTAUTH_BACKEND_URL: http://api:8000/api/ NODE_ENV: development BODY_SIZE_LIMIT: 20971520 NEXT_PUBLIC_ENABLE_REUSE_TRIGGER_OPTION: true volumes: - /app/node_modules - /app/.next depends_on: api: condition: service_healthy api: image: ghcr.io/health-informatics-uon/carrot/backend:${RELEASE_VERSION} ports: - 8000:8000 environment: - FRONTEND_URL=http://frontend:3000 - ALLOWED_HOSTS=['localhost', '127.0.0.1','api'] - DB_ENGINE=django.db.backends.postgresql - DB_HOST=db - DB_PORT=5432 - DB_NAME=postgres - DB_USER=postgres - DB_PASSWORD=postgres - DEBUG=True - SECRET_KEY=secret - SIGNING_KEY=secret - STORAGE_TYPE=minio - MINIO_ENDPOINT=minio:9000 - MINIO_ACCESS_KEY=minioadmin - MINIO_SECRET_KEY=minioadmin - WORKER_SERVICE_TYPE=airflow - AIRFLOW_BASE_URL=http://airflow-webserver:8080/api/v1/ - AIRFLOW_AUTO_MAPPING_DAG_ID=auto_mapping - AIRFLOW_SCAN_REPORT_PROCESSING_DAG_ID=scan_report_processing - AIRFLOW_RULES_EXPORT_DAG_ID=rules_export - AIRFLOW_ADMIN_USERNAME=admin - AIRFLOW_ADMIN_PASSWORD=admin - DATA_UPLOAD_MAX_MEMORY_SIZE=10485760 - SUPERUSER_DEFAULT_PASSWORD=admin - SUPERUSER_DEFAULT_EMAIL=admin@carrot.com - SUPERUSER_DEFAULT_USERNAME=admin healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/health"] interval: 10s timeout: 5s retries: 5 start_period: 30s depends_on: omop-lite: condition: service_completed_successfully minio: image: minio/minio restart: always command: server /data --console-address ":9001" ports: - "9000:9000" - "9001:9001" environment: MINIO_ROOT_USER: "minioadmin" MINIO_ROOT_PASSWORD: "minioadmin" MINIO_BROWSER: "on" MINIO_DOMAIN: "minio" volumes: - minio_data:/data healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] interval: 10s timeout: 5s retries: 5 airflow-webserver: <<: *airflow-common image: ghcr.io/health-informatics-uon/carrot/airflow-webserver:${RELEASE_VERSION} ports: - "8080:8080" environment: <<: *airflow-common-env AIRFLOW_ADMIN_USERNAME: admin AIRFLOW_ADMIN_PASSWORD: admin scheduler: <<: *airflow-common image: ghcr.io/health-informatics-uon/carrot/airflow-scheduler:${RELEASE_VERSION} environment: <<: *airflow-common-env AIRFLOW__CORE__EXECUTE_TASKS_NEW_PYTHON_INTERPRETER: True AIRFLOW_DEBUG_MODE: False volumes: db_data: minio_data: