--- services: # Mathesar App built with the same configurations as the production image # but with additional testing dependencies. # It is used to run automated test cases to verify if the app works as intended dev-db-base: command: ["postgres", "-c", "shared_preload_libraries=plugin_debugger"] build: context: . dockerfile: Dockerfile.devdb args: PG_VERSION: ${PG_VERSION:-17} environment: - PG_VERSION=${PG_VERSION:-17} - POSTGRES_DB=mathesar_django - POSTGRES_USER=mathesar - POSTGRES_PASSWORD=mathesar - PGDATA=/var/lib/postgresql/data healthcheck: test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB:-mathesar_django} -U $${POSTGRES_USER:-mathesar}"] interval: 5s timeout: 1s retries: 30 start_period: 5s dev-db: container_name: mathesar_dev_db extends: service: dev-db-base ports: - "5432:5432" volumes: - dev_postgres_data:/var/lib/postgresql/data - dev_postgres_socket:/var/run/postgresql - ./db/sql:/sql/ # An S3-compatible object store for local development. Don't use in prod. obj-store: container_name: mathesar-dev-store image: quay.io/minio/minio ports: - "9000:9000" - "9001:9001" environment: - MINIO_ROOT_USER=mathesar - MINIO_ROOT_PASSWORD=mathesar command: server --console-address ":9001" /data volumes: - dev_obj_store_data:/data # A Django development webserver + Svelte development server used when developing Mathesar. # The code changes are hot reloaded and debug flags are enabled to aid developers working on Mathesar. # It is not recommended to use this service in production environment. dev-service: container_name: mathesar_service_dev image: mathesar/mathesar-dev:latest pull_policy: never build: context: . target: development dockerfile: Dockerfile args: PYTHON_VERSION: ${PYTHON_VERSION:-3.14-bookworm} environment: - MODE=${MODE:-DEVELOPMENT} - SKIP_STATIC_COLLECTION=true - DEBUG=${DEBUG:-True} - DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE:-config.settings.development} - ALLOWED_HOSTS=${ALLOWED_HOSTS:-*} - SECRET_KEY=${SECRET_KEY:-} - SSO_CONFIG_DICT=${SSO_CONFIG_DICT:-{}} - REQUIRE_SSO_LOGIN=${REQUIRE_SSO_LOGIN:-false} - MATHESAR_DJANGO_ADMIN_ENABLED=${MATHESAR_DJANGO_ADMIN_ENABLED:-false} - FILE_STORAGE_DICT=${FILE_STORAGE_DICT:-{}} - MATHESAR_ANALYTICS_URL=${MATHESAR_ANALYTICS_URL:-https://example.com/collector} - MATHESAR_INIT_REPORT_URL=${MATHESAR_INIT_REPORT_URL:-https://example.com/hello} - MATHESAR_FEEDBACK_URL=${MATHESAR_FEEDBACK_URL:-https://example.com/feedback} - MATHESAR_TERMS_OF_SERVICE_URL=${MATHESAR_TERMS_OF_SERVICE_URL:-} - MATHESAR_PRIVACY_POLICY_URL=${MATHESAR_PRIVACY_POLICY_URL:-} - MATHESAR_LANDING_PAGE_URL=${MATHESAR_LANDING_PAGE_URL:-} - MATHESAR_INSTANCE_NAME=${MATHESAR_INSTANCE_NAME:-Mathesar} - MATHESAR_AUTH_LOGO_URL=${MATHESAR_AUTH_LOGO_URL:-} - MATHESAR_LOGIN_PAGE_TEXT_DICT=${MATHESAR_LOGIN_PAGE_TEXT_DICT:-{}} - MATHESAR_LOGIN_PAGE_BACKGROUND=${MATHESAR_LOGIN_PAGE_BACKGROUND:-} - DJANGO_SUPERUSER_PASSWORD=password - POSTGRES_DB=mathesar_django - POSTGRES_USER=mathesar - POSTGRES_PASSWORD=mathesar - POSTGRES_HOST=${POSTGRES_HOST:-mathesar_dev_db} # replace mathesar_dev_db with /var/dev_postgres_socket for connecting to mathesar_dev_db via unix socket instead - POSTGRES_PORT=5432 - PER_USER_DATABASES_ENABLED=${PER_USER_DATABASES_ENABLED:-} volumes: - .:/code/ - dev_postgres_socket:/var/dev_postgres_socket - ui_node_modules:/code/mathesar_ui/node_modules/ - mathesar_secrets:/code/.secrets/ depends_on: dev-db: condition: service_healthy # On dev, following ports are exposed to other containers, and the host. ports: - "8000:8000" - "3000:3000" - "6006:6006" test-service: container_name: mathesar_service_test image: mathesar/mathesar-test:latest environment: - POSTGRES_DB=mathesar_django - POSTGRES_USER=mathesar - POSTGRES_PASSWORD=mathesar - POSTGRES_HOST=${POSTGRES_HOST:-mathesar_dev_db} - POSTGRES_PORT=5432 pull_policy: never build: context: . target: ${TARGET:-testing} dockerfile: Dockerfile args: PYTHON_VERSION: ${PYTHON_VERSION:-3.14-bookworm} volumes: - dev_postgres_socket:/var/dev_postgres_socket depends_on: - dev-db ports: - "8000:8000" volumes: ui_node_modules: dev_postgres_data: dev_postgres_socket: dev_obj_store_data: mathesar_secrets: