mirror of
https://github.com/alex289/CleanArchitecture.git
synced 2025-06-29 18:21:08 +00:00
69 lines
1.6 KiB
YAML
69 lines
1.6 KiB
YAML
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- 80:80
|
|
- 8080:8080
|
|
depends_on:
|
|
db:
|
|
condition: service_started
|
|
redis:
|
|
condition: service_started
|
|
rabbitmq:
|
|
condition: service_healthy
|
|
links:
|
|
- db
|
|
environment:
|
|
- ASPNETCORE_HTTP_PORTS=80
|
|
- Kestrel__Endpoints__Http__Url=http://+:80
|
|
- Kestrel__Endpoints__Grpc__Url=http://+:8080
|
|
- Kestrel__Endpoints__Grpc__Protocols=Http2
|
|
- ConnectionStrings__DefaultConnection=Server=db;Database=clean-architecture;Trusted_Connection=False;MultipleActiveResultSets=true;TrustServerCertificate=True;User Id=SA;Password=Password123!#
|
|
healthcheck:
|
|
test: ["CMD", "curl", "--fail", "http://localhost/healthz"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
db:
|
|
image: mcr.microsoft.com/mssql/server
|
|
environment:
|
|
- ACCEPT_EULA=Y
|
|
- SA_PASSWORD=Password123!#
|
|
ports:
|
|
- 1433:1433
|
|
|
|
redis:
|
|
image: redis:latest
|
|
environment:
|
|
# ALLOW_EMPTY_PASSWORD is recommended only for development.
|
|
- ALLOW_EMPTY_PASSWORD=yes
|
|
- REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
|
|
ports:
|
|
- '6379:6379'
|
|
volumes:
|
|
- 'redis_data:/bitnami/redis/data'
|
|
|
|
rabbitmq:
|
|
image: "rabbitmq:4-management"
|
|
ports:
|
|
- 5672:5672
|
|
- 15672:15672
|
|
environment:
|
|
- RABBITMQ_DEFAULT_USER=admin
|
|
- RABBITMQ_DEFAULT_PASS=DOIA9234JF
|
|
volumes:
|
|
- rabbitmq_data:/var/lib/rabbitmq
|
|
healthcheck:
|
|
test: rabbitmq-diagnostics -q ping
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 3
|
|
|
|
volumes:
|
|
rabbitmq_data:
|
|
redis_data:
|
|
driver: local
|