Skip to content

Commit 019bfb8

Browse files
committed
docker: docker-compose
1 parent 9a9f2ce commit 019bfb8

File tree

11 files changed

+213
-9
lines changed

11 files changed

+213
-9
lines changed

.editorconfig

+192
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Don't use tabs for indentation.
7+
[*]
8+
indent_style = space
9+
# (Please don't specify an indent_size here; that has too many unintended consequences.)
10+
11+
# Code files
12+
[*.{cs,csx,vb,vbx}]
13+
indent_size = 4
14+
insert_final_newline = true
15+
charset = utf-8-bom
16+
17+
# XML project files
18+
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
19+
indent_size = 2
20+
21+
# XML config files
22+
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
23+
indent_size = 2
24+
25+
# JSON files
26+
[*.json]
27+
indent_size = 2
28+
29+
# Shell script files
30+
[*.sh]
31+
end_of_line = lf
32+
indent_size = 2
33+
34+
# Dotnet code style settings:
35+
[*.{cs,vb}]
36+
# Sort using and Import directives with System.* appearing first
37+
dotnet_sort_system_directives_first = true
38+
# Avoid "this." and "Me." if not necessary
39+
dotnet_style_qualification_for_field = false:suggestion
40+
dotnet_style_qualification_for_property = false:suggestion
41+
dotnet_style_qualification_for_method = false:suggestion
42+
dotnet_style_qualification_for_event = false:suggestion
43+
44+
# Use language keywords instead of framework type names for type references
45+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
46+
dotnet_style_predefined_type_for_member_access = true:suggestion
47+
48+
# Suggest more modern language features when available
49+
dotnet_style_object_initializer = true:suggestion
50+
dotnet_style_collection_initializer = true:suggestion
51+
dotnet_style_coalesce_expression = true:suggestion
52+
dotnet_style_null_propagation = true:suggestion
53+
dotnet_style_explicit_tuple_names = true:suggestion
54+
55+
# Non-private static fields are PascalCase
56+
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity = suggestion
57+
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non_private_static_fields
58+
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style
59+
60+
dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field
61+
dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected internal, private protected
62+
dotnet_naming_symbols.non_private_static_fields.required_modifiers = static
63+
64+
dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case
65+
66+
# Non-private readonly fields are PascalCase
67+
dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.severity = suggestion
68+
dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.symbols = non_private_readonly_fields
69+
dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.style = non_private_readonly_field_style
70+
71+
dotnet_naming_symbols.non_private_readonly_fields.applicable_kinds = field
72+
dotnet_naming_symbols.non_private_readonly_fields.applicable_accessibilities = public, protected, internal, protected internal, private protected
73+
dotnet_naming_symbols.non_private_readonly_fields.required_modifiers = readonly
74+
75+
dotnet_naming_style.non_private_readonly_field_style.capitalization = pascal_case
76+
77+
# Constants are PascalCase
78+
dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion
79+
dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants
80+
dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style
81+
82+
dotnet_naming_symbols.constants.applicable_kinds = field, local
83+
dotnet_naming_symbols.constants.required_modifiers = const
84+
85+
dotnet_naming_style.constant_style.capitalization = pascal_case
86+
87+
# Static fields are camelCase and start with s_
88+
dotnet_naming_rule.static_fields_should_be_camel_case.severity = suggestion
89+
dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields
90+
dotnet_naming_rule.static_fields_should_be_camel_case.style = static_field_style
91+
92+
dotnet_naming_symbols.static_fields.applicable_kinds = field
93+
dotnet_naming_symbols.static_fields.required_modifiers = static
94+
95+
dotnet_naming_style.static_field_style.capitalization = camel_case
96+
dotnet_naming_style.static_field_style.required_prefix = s_
97+
98+
# Instance fields are camelCase and start with _
99+
dotnet_naming_rule.instance_fields_should_be_camel_case.severity = suggestion
100+
dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields
101+
dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style
102+
103+
dotnet_naming_symbols.instance_fields.applicable_kinds = field
104+
105+
dotnet_naming_style.instance_field_style.capitalization = camel_case
106+
dotnet_naming_style.instance_field_style.required_prefix = _
107+
108+
# Locals and parameters are camelCase
109+
dotnet_naming_rule.locals_should_be_camel_case.severity = suggestion
110+
dotnet_naming_rule.locals_should_be_camel_case.symbols = locals_and_parameters
111+
dotnet_naming_rule.locals_should_be_camel_case.style = camel_case_style
112+
113+
dotnet_naming_symbols.locals_and_parameters.applicable_kinds = parameter, local
114+
115+
dotnet_naming_style.camel_case_style.capitalization = camel_case
116+
117+
# Local functions are PascalCase
118+
dotnet_naming_rule.local_functions_should_be_pascal_case.severity = suggestion
119+
dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions
120+
dotnet_naming_rule.local_functions_should_be_pascal_case.style = local_function_style
121+
122+
dotnet_naming_symbols.local_functions.applicable_kinds = local_function
123+
124+
dotnet_naming_style.local_function_style.capitalization = pascal_case
125+
126+
# By default, name items with PascalCase
127+
dotnet_naming_rule.members_should_be_pascal_case.severity = suggestion
128+
dotnet_naming_rule.members_should_be_pascal_case.symbols = all_members
129+
dotnet_naming_rule.members_should_be_pascal_case.style = pascal_case_style
130+
131+
dotnet_naming_symbols.all_members.applicable_kinds = *
132+
133+
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
134+
135+
# CSharp code style settings:
136+
[*.cs]
137+
# Indentation preferences
138+
csharp_indent_block_contents = true
139+
csharp_indent_braces = false
140+
csharp_indent_case_contents = true
141+
csharp_indent_case_contents_when_block = true
142+
csharp_indent_switch_labels = true
143+
csharp_indent_labels = flush_left
144+
145+
# Prefer "var" everywhere
146+
csharp_style_var_for_built_in_types = true:suggestion
147+
csharp_style_var_when_type_is_apparent = true:suggestion
148+
csharp_style_var_elsewhere = true:suggestion
149+
150+
# Prefer method-like constructs to have a block body
151+
csharp_style_expression_bodied_methods = false:none
152+
csharp_style_expression_bodied_constructors = false:none
153+
csharp_style_expression_bodied_operators = false:none
154+
155+
# Prefer property-like constructs to have an expression-body
156+
csharp_style_expression_bodied_properties = true:none
157+
csharp_style_expression_bodied_indexers = true:none
158+
csharp_style_expression_bodied_accessors = true:none
159+
160+
# Suggest more modern language features when available
161+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
162+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
163+
csharp_style_inlined_variable_declaration = true:suggestion
164+
csharp_style_throw_expression = true:suggestion
165+
csharp_style_conditional_delegate_call = true:suggestion
166+
167+
# Newline settings
168+
csharp_new_line_before_open_brace = all
169+
csharp_new_line_before_else = true
170+
csharp_new_line_before_catch = true
171+
csharp_new_line_before_finally = true
172+
csharp_new_line_before_members_in_object_initializers = true
173+
csharp_new_line_before_members_in_anonymous_types = true
174+
csharp_new_line_between_query_expression_clauses = true
175+
176+
# Spacing
177+
csharp_space_after_cast = false
178+
csharp_space_after_colon_in_inheritance_clause = true
179+
csharp_space_after_keywords_in_control_flow_statements = true
180+
csharp_space_around_binary_operators = before_and_after
181+
csharp_space_before_colon_in_inheritance_clause = true
182+
csharp_space_between_method_call_empty_parameter_list_parentheses = false
183+
csharp_space_between_method_call_name_and_opening_parenthesis = false
184+
csharp_space_between_method_call_parameter_list_parentheses = false
185+
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
186+
csharp_space_between_method_declaration_parameter_list_parentheses = false
187+
csharp_space_between_parentheses = false
188+
189+
# Blocks are allowed
190+
csharp_prefer_braces = true:silent
191+
csharp_preserve_single_line_blocks = true
192+
csharp_preserve_single_line_statements = true

Demo.Consumer.HandleMessages/Program.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ public class Program
55
static void Main(string[] args)
66
{
77
var startUp = new Startup();
8-
8+
99
startUp.Run();
1010
}
1111
}

Demo.Core/Contracts/Values/PostMessageRequest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ namespace Demo.Core.Contracts.Values
22
{
33
public class PostMessageRequest
44
{
5-
public string Campo { get; set; }
5+
public string Campo { get; set; }
66
}
77
}

Demo.Core/Data/ApiClient/Google/GoogleMapsRepository.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public async Task<GoogleGeoCodeView> GetGeoCodeByCEPAsync(string cep)
4141
if (!obj.status.Equals("OK", StringComparison.InvariantCultureIgnoreCase))
4242
throw new HttpResponseException(new HttpResponseMessage
4343
{
44-
StatusCode = HttpStatusCode.NotFound,
44+
StatusCode = HttpStatusCode.NotFound,
4545
ReasonPhrase = "Endereço não encontrado"
4646
});
4747

Demo.Core/Services/CharacterServices.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class CharacterServices : BaseServices, ICharacterServices
1313
{
1414
private readonly ICharacterRepository _characterRepository;
1515
private readonly IFamilyRepository _familyRepository;
16-
private readonly IDistributedCache _redisProvider;
16+
private readonly IDistributedCache _redisProvider;
1717

1818
public CharacterServices(ICharacterRepository characterRepository, IFamilyRepository familyRepository, IDistributedCache redisProvider)
1919
{

Demo.Core/Services/ServicesDI.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public static IServiceCollection AddServices(this IServiceCollection services)
1616
services.AddSingleton<IValuesServices, ValuesServices>();
1717

1818
services.AddScoped<ICharacterServices, CharacterServices>();
19-
19+
2020
//GraphQL Services
2121
services.AddGraphServices();
2222

Framework.Data/CacheProviders/Redis/RedisExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public static IServiceCollection AddRedisCache(this IServiceCollection services)
1717

1818
services.AddDistributedRedisCache(config =>
1919
{
20-
config.ConfigurationOptions= options;
20+
config.ConfigurationOptions = options;
2121
});
2222

2323
//services.AddHealthChecks()

Framework.MessageBroker.Tests/RabbitMQ/ExplorerTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ namespace Framework.MessageBroker.Tests.RabbitMQ
22
{
33
public class ExplorerTests
44
{
5-
5+
66
}
77
}

Framework.MessageBroker/RabbitMQ/IRabbitMQPublisher.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ namespace Framework.MessageBroker.RabbitMQ
55
/// </summary>
66
public interface IRabbitMQPublisher : IPublisher
77
{
8-
8+
99
}
1010
}

Framework.MessageBroker/RabbitMQ/IRabbitMQSubscriber.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ namespace Framework.MessageBroker.RabbitMQ
77
/// </summary>
88
public interface IRabbitMQSubscriber : ISubscriber, IDisposable
99
{
10-
10+
1111
}
1212
}

docker-compose.yml

+12
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,23 @@ services:
1919
- mysqldb
2020
- rabbitmq
2121
- redis
22+
- healthchecks-ui
2223
depends_on:
2324
- mongodb
2425
- mysqldb
2526
- rabbitmq
2627
- redis
28+
healthchecks-ui:
29+
image: xabarilcoding/healthchecksui
30+
container_name: healthchecks-ui
31+
restart: always
32+
ports:
33+
- "8083:80"
34+
environment:
35+
"HealthChecks-UI:HealthChecks:0:Name": "aspnet-core-webapi"
36+
"HealthChecks-UI:HealthChecks:0:Uri": "http://aspnet-core-webapi/healthz"
37+
depends_on:
38+
- web
2739
mongodb:
2840
image: mongo
2941
container_name: "mongodb"

0 commit comments

Comments
 (0)