Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 5 additions & 17 deletions docker-compose.Staging.Infrastructure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ services:
ACCEPT_EULA: "Y"
healthcheck:
test: /opt/mssql-tools/bin/sqlcmd -S mssql -U sa -P "$$SA_PASSWORD" -Q "SELECT 1" || exit 1
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
deploy:
resources:
limits:
Expand All @@ -38,10 +34,6 @@ services:
RABBITMQ_DEFAULT_VHOST: "eventual-shop"
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
deploy:
resources:
limits:
Expand All @@ -62,10 +54,6 @@ services:
MONGO_INITDB_ROOT_PASSWORD: "secret"
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo mongodb:27017/test --quiet
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
deploy:
resources:
limits:
Expand Down Expand Up @@ -124,7 +112,7 @@ services:
restart_policy:
condition: any
ports:
- "9200"
- "9200:9200"
- "9300"
networks:
- internal
Expand All @@ -138,12 +126,12 @@ services:
ELASTICSEARCH_USERNAME: EventualShop
ELASTICSEARCH_PASSWORD: EventualShop
healthcheck:
test: [ "CMD", "curl", "-f", "http://kibana:5601/api/status" ]
test: [ "CMD", "curl", "-f", "http://kibana:5601/api/status" ]
ports:
- "5601:5601"
depends_on:
elasticsearch:
condition: service_healthy
# depends_on:
# elasticsearch:
# condition: service_healthy
deploy:
resources:
limits:
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.Staging.Services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,8 @@ services:
healthcheck:
test: [ "CMD", "curl", "-f", "http://webapi/healthz" ]
depends_on:
kibana:
condition: service_healthy
rabbitmq:
condition: service_healthy
networks:
Expand Down
24 changes: 15 additions & 9 deletions filebeat.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
filebeat.inputs:
- type: filestream
id: my-filestream-id
enabled: true
- type: container
paths:
- /var/log/messages
- /var/log/*.log
- '/var/lib/docker/containers/*/*.log'

filebeat.config.modules:
path: ${path.config}/modules.d/*.yml

setup.ilm.overwrite: true

action.auto_create_index: true

output.elasticsearch:
hosts: [ "http://elasticsearch:9200" ]
index: "eventual-shop-%{+yyyy.MM.dd}"
username: "EventualShop"
password: "EventualShop"
index: "EventualShop-%{+yyyy-MM-dd}"

setup.template.enabled: true
setup.template.name: "eventual-shop"
setup.template.pattern: "eventual-shop-*"

setup.kibana:
host: "http://kibana:5601"

setup.template.name: "EventualShop"
setup.template.pattern: "EventualShop-*"
logging.level: debug

logging.level: info
5 changes: 1 addition & 4 deletions src/Web/WebAPI/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,4 @@ RUN sudo dpkg -i filebeat-8.6.2-amd64.deb
COPY filebeat.yml /etc/filebeat/
RUN chmod go-w /etc/filebeat/filebeat.yml

CMD filebeat modules enable elasticsearch
CMD filebeat setup
CMD service filebeat start
CMD dotnet WebAPI.dll
CMD filebeat modules enable elasticsearch && filebeat setup && service filebeat start && dotnet WebAPI.dll
2 changes: 1 addition & 1 deletion src/Web/WebAPI/appsettings.Staging.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"Args": {
"Formatter": "Serilog.Formatting.Elasticsearch.ElasticsearchJsonFormatter,Serilog.Formatting.Elasticsearch",
"Theme": "Serilog.Sinks.SystemConsole.Themes.AnsiConsoleTheme::Code, Serilog.Sinks.Console",
"OutputTemplate": "EventualShop-{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}"
"OutputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}"
}
}
]
Expand Down