Add Azurite to test infrastructure (#36485)

Wire Microsoft's local Azure Blob Storage emulator into the dev/CI
docker-compose stack so an upcoming Azure FileBackend driver and its
tests have a target to run against, without requiring an Azure
account.

* Define the azurite service in docker-compose.common.yml (used by
  both the local-dev and CI compose files).
* Add azurite to the makefile + main docker-compose.yml service maps,
  and to docker-compose-generator so callers can include it via
  ENABLED_DOCKER_SERVICES.
* Auto-include azurite in `make start-docker` (mirrors how minio is
  auto-included today), so existing local workflows keep working
  without any per-developer config change.
* Add azurite to the CI start_dependencies wait set so CI brings it up
  alongside postgres/minio.
* Set CI_AZURITE_HOST / CI_AZURITE_PORT in dotenv/test.env, mirroring
  the CI_MINIO_* pattern.

No production filestore changes — this PR is mergeable in isolation
with no user-visible behavior.

------
AI assisted commit
This commit is contained in:
Alejandro García Montoro
2026-05-11 12:06:59 +02:00
committed by GitHub
parent 0afef7760c
commit ef8a8cf2cb
7 changed files with 27 additions and 2 deletions
+3
View File
@@ -233,6 +233,9 @@ ifneq ($(DOCKER_SERVICES_OVERRIDE),true)
ifeq (,$(findstring minio,$(ENABLED_DOCKER_SERVICES)))
TEMP_DOCKER_SERVICES:=$(TEMP_DOCKER_SERVICES) minio
endif
ifeq (,$(findstring azurite,$(ENABLED_DOCKER_SERVICES)))
TEMP_DOCKER_SERVICES:=$(TEMP_DOCKER_SERVICES) azurite
endif
ifeq ($(BUILD_ENTERPRISE_READY),true)
ifeq (,$(findstring openldap,$(ENABLED_DOCKER_SERVICES)))
TEMP_DOCKER_SERVICES:=$(TEMP_DOCKER_SERVICES) openldap
@@ -26,6 +26,7 @@ func main() {
validServices := map[string]int{
"postgres": 5432,
"minio": 9000,
"azurite": 10000,
"inbucket": 9001,
"openldap": 389,
"elasticsearch": 9200,
+6
View File
@@ -34,6 +34,12 @@ services:
MINIO_ROOT_USER: minioaccesskey
MINIO_ROOT_PASSWORD: miniosecretkey
MINIO_KMS_SECRET_KEY: my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=
azurite:
image: "mcr.microsoft.com/azure-storage/azurite:3.34.0"
logging: *default-logging
command: "azurite-blob --blobHost 0.0.0.0 --blobPort 10000 --skipApiVersionCheck"
networks:
- mm-test
inbucket:
image: "inbucket/inbucket:3.1.1"
logging: *default-logging
+6 -1
View File
@@ -8,6 +8,10 @@ services:
extends:
file: docker-compose.common.yml
service: minio
azurite:
extends:
file: docker-compose.common.yml
service: azurite
inbucket:
extends:
file: docker-compose.common.yml
@@ -60,12 +64,13 @@ services:
depends_on:
- postgres
- minio
- azurite
- inbucket
- openldap
- elasticsearch
- opensearch
- redis
command: postgres:5432 minio:9000 inbucket:9001 openldap:389 elasticsearch:9200 opensearch:9201 redis:6379
command: postgres:5432 minio:9000 azurite:10000 inbucket:9001 openldap:389 elasticsearch:9200 opensearch:9201 redis:6379
networks:
mm-test:
+2
View File
@@ -3,8 +3,10 @@ GOBIN=/mattermost/server/bin
CI_INBUCKET_HOST=inbucket
CI_MINIO_HOST=minio
CI_AZURITE_HOST=azurite
CI_INBUCKET_PORT=9001
CI_MINIO_PORT=9000
CI_AZURITE_PORT=10000
CI_INBUCKET_SMTP_PORT=10025
CI_LDAP_HOST=openldap
IS_CI=true
+1 -1
View File
@@ -4,7 +4,7 @@
# Enable services to be run in docker.
#
# Possible options: postgres, minio, inbucket, openldap, dejavu,
# Possible options: postgres, minio, azurite, inbucket, openldap, dejavu,
# keycloak, elasticsearch, opensearch, redis, prometheus,
# grafana, loki and otel-collector.
#
+8
View File
@@ -18,6 +18,14 @@ services:
extends:
file: build/docker-compose.common.yml
service: minio
azurite:
restart: 'no'
container_name: mattermost-azurite
ports:
- "10000:10000"
extends:
file: build/docker-compose.common.yml
service: azurite
inbucket:
restart: 'no'
container_name: mattermost-inbucket