-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
83 lines (76 loc) · 1.97 KB
/
Copy pathdocker-compose.yml
File metadata and controls
83 lines (76 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
version: '3.8'
services:
# WebAPI: sua aplicação de API REST
webapi:
image: webapi:latest # Use a imagem que você criou ou puxe uma do Docker Hub
build:
context: .
dockerfile: Dockerfile # Se você estiver construindo a partir de um Dockerfile
ports:
- "9000:80" # Mapeie a porta da sua API
depends_on:
- sqlserver
- rabbitmq
- seq
environment:
- ASPNETCORE_ENVIRONMENT=Development
- SQLSERVER_CONNECTION_STRING=Server=sqlserver;Database=WebAPIDb;User=sa;Password=yourStrong!Passw0rd;
- RABBITMQ_URI=amqp://rabbitmq:5672
- SEQ_URI=http://seq:5341
- HANGFIRE_DASHBOARD_URI=http://webapi/hangfire
- SWAGGER_ENABLED=true
networks:
- webapi-network
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:80/health"]
interval: 30s
retries: 3
start_period: 10s
timeout: 10s
# SQL Server
sqlserver:
image: mcr.microsoft.com/mssql/server:2019-latest
container_name: sqlserver
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=yourStrong!Passw0rd
ports:
- "1433:1433"
networks:
- webapi-network
volumes:
- sql_data:/var/opt/mssql
# RabbitMQ
rabbitmq:
image: rabbitmq:3-management
container_name: rabbitmq
ports:
- "15672:15672" # Para acessar o painel de gerenciamento RabbitMQ
- "5672:5672" # Porta AMQP
networks:
- webapi-network
# Seq: ferramenta de log agregador
seq:
image: datalust/seq:latest
container_name: seq
ports:
- "5341:5341"
networks:
- webapi-network
environment:
- SEQ_ACCEPT_EULA=Y
# Hangfire: Fila de background para tarefas
hangfire:
image: hangfireio/hangfire
container_name: hangfire
ports:
- "5000:5000" # Porta para o painel de administração Hangfire
networks:
- webapi-network
depends_on:
- webapi
volumes:
sql_data:
networks:
webapi-network:
driver: bridge