Created
April 26, 2025 14:11
-
-
Save guibranco/a3dfa5575dd5a6617bc5b4e6b91b10fb to your computer and use it in GitHub Desktop.
A docker-compose file with: CosmosDB (noSQL), Microsoft SQL Server (SQL), RabbitMQ (queue), Redis (noSQL), SEQ (log), SonarQube (local analysis), and Azurite (storage) services, with health checks and port mappings for local development
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
cosmosdb: | |
image: mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest | |
container_name: cosmosdb | |
deploy: | |
resources: | |
reservations: | |
cpus: "0.1" | |
memory: 1.5G | |
environment: | |
- AZURE_COSMOS_EMULATOR_PARTITION_COUNT=10 | |
- AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE=true | |
ports: | |
- 8081:8081 | |
- 10251-10254:10251-10254 | |
restart: unless-stopped | |
healthcheck: | |
test: ["CMD", "curl", "-f", "http://localhost:8081/_explorer/emulator.pem"] | |
interval: 30s | |
timeout: 10s | |
retries: 5 | |
start_period: 60s | |
mssql: | |
image: mcr.microsoft.com/mssql/server:2022-latest | |
container_name: mssql | |
environment: | |
- ACCEPT_EULA=Y | |
- MSSQL_SA_PASSWORD=mydummys@passw0rd | |
ports: | |
- 1444:1433 | |
restart: unless-stopped | |
volumes: | |
- ${DATA_PATH}/mssql:/var/opt/mssql/data | |
healthcheck: | |
test: ["CMD", "/opt/mssql-tools/bin/sqlcmd", "-S", "localhost", "-U", "sa", "-P", "mydummys@passw0rd", "-Q", "SELECT 1"] | |
interval: 30s | |
timeout: 10s | |
retries: 5 | |
start_period: 30s | |
rabbitmq: | |
image: rabbitmq:3-management | |
container_name: rabbitmq | |
ports: | |
- 15672:15672 | |
- 5672:5672 | |
restart: unless-stopped | |
volumes: | |
- ${DATA_PATH}/rabbitmq:/var/lib/rabbitmq | |
healthcheck: | |
test: ["CMD", "rabbitmq-diagnostics", "status"] | |
interval: 30s | |
timeout: 10s | |
retries: 5 | |
start_period: 20s | |
redis: | |
image: redis:6 | |
container_name: redis | |
ports: | |
- 6379:6379 | |
restart: unless-stopped | |
volumes: | |
- ${DATA_PATH}/redis:/data | |
healthcheck: | |
test: ["CMD", "redis-cli", "ping"] | |
interval: 30s | |
timeout: 10s | |
retries: 5 | |
start_period: 10s | |
seq: | |
image: datalust/seq:latest | |
container_name: seq | |
environment: | |
- ACCEPT_EULA=Y | |
ports: | |
- 5340:80 | |
- 5341:5341 | |
restart: unless-stopped | |
volumes: | |
- ${DATA_PATH}/seq:/data | |
healthcheck: | |
test: ["CMD", "curl", "-f", "http://localhost:80/health"] | |
interval: 30s | |
timeout: 10s | |
retries: 5 | |
start_period: 20s | |
sonarqube: | |
image: sonarqube:10-community | |
container_name: sonarqube | |
environment: | |
- SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true | |
ports: | |
- 9000:9000 | |
restart: unless-stopped | |
volumes: | |
- ${DATA_PATH}/sonarqube/data:/opt/sonarqube/data | |
- ${DATA_PATH}/sonarqube/extensions:/opt/sonarqube/extensions | |
- ${DATA_PATH}/sonarqube/logs:/opt/sonarqube/logs | |
healthcheck: | |
test: ["CMD", "curl", "-f", "http://localhost:9000/api/system/health"] | |
interval: 30s | |
timeout: 10s | |
retries: 5 | |
start_period: 30s | |
azurite: | |
image: mcr.microsoft.com/azure-storage/azurite:latest | |
container_name: storage | |
ports: | |
- 10000:10000 | |
- 10001:10001 | |
- 10002:10002 | |
restart: unless-stopped | |
volumes: | |
- ${DATA_PATH}/storage:/data | |
healthcheck: | |
test: ["CMD", "curl", "-f", "http://localhost:10000/devstoreaccount1"] | |
interval: 30s | |
timeout: 10s | |
retries: 5 | |
start_period: 20s | |
networks: | |
default: | |
driver: bridge | |
ipam: | |
driver: default | |
config: | |
- subnet: 192.168.254.0/27 | |
gateway: 192.168.254.1 | |
name: dev-network |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment