fix pool sizes
All checks were successful
Build and Publish / build-release (push) Successful in 2m38s
All checks were successful
Build and Publish / build-release (push) Successful in 2m38s
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import Config
|
||||
|
||||
# Do not print debug messages in production
|
||||
config :logger, level: :info
|
||||
config :logger, level: :debug
|
||||
|
||||
# Runtime production configuration, including reading
|
||||
# of environment variables, is done on config/runtime.exs.
|
||||
|
||||
@@ -7,6 +7,20 @@ import Config
|
||||
# any compile-time configuration in here, as it won't be applied.
|
||||
# The block below contains prod specific runtime configuration.
|
||||
|
||||
logger_level =
|
||||
case System.get_env("LOG_LEVEL", "info") do
|
||||
"debug" -> :debug
|
||||
"info" -> :info
|
||||
"warn" -> :warning
|
||||
"error" -> :error
|
||||
val when val in ["warning", "error"] -> :error
|
||||
_ -> :info
|
||||
end
|
||||
|
||||
config :logger, level: logger_level
|
||||
|
||||
config :logger, :console, format: {Logger.Formatter, :format}
|
||||
|
||||
# ## Using releases
|
||||
#
|
||||
# If you use `mix release`, you need to explicitly enable the server
|
||||
@@ -39,13 +53,13 @@ if config_env() == :prod do
|
||||
|
||||
config :policy_service, PolicyService.Repo,
|
||||
url: database_url,
|
||||
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
|
||||
pool_size: 1,
|
||||
socket_options: maybe_ipv6
|
||||
|
||||
config :policy_service, PolicyService.EventStore,
|
||||
serializer: Commanded.Serialization.JsonSerializer,
|
||||
url: database_url,
|
||||
pool_size: 5
|
||||
pool_size: 1
|
||||
|
||||
secret_key_base =
|
||||
System.get_env("SECRET_KEY_BASE") ||
|
||||
|
||||
@@ -29,13 +29,13 @@
|
||||
meta = {
|
||||
mainProgram = "policy_service";
|
||||
};
|
||||
removeCookie = false;
|
||||
};
|
||||
dockerImage = pkgs.dockerTools.buildLayeredImage {
|
||||
name = "policy_service";
|
||||
contents = [ package pkgs.busybox pkgs.shadow ];
|
||||
contents = [ package pkgs.bashInteractive pkgs.busybox pkgs.shadow ];
|
||||
config = {
|
||||
Cmd = [ "${package}/bin/policy_service" "start" ];
|
||||
Entrypoint = [ "/bin/sh" ];
|
||||
};
|
||||
};
|
||||
in
|
||||
|
||||
@@ -25,6 +25,7 @@ controllers:
|
||||
repository: gitea.corredorconect.com/software-engineering/policy-service
|
||||
tag: '{{ $.Chart.AppVersion }}'
|
||||
env:
|
||||
LOG_LEVEL: debug
|
||||
MIX_ENV: prod
|
||||
PORT: "8080"
|
||||
PHX_HOST: "0.0.0.0"
|
||||
@@ -65,10 +66,10 @@ controllers:
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 512Mi
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
memory: 512Mi
|
||||
|
||||
service:
|
||||
main:
|
||||
|
||||
Reference in New Issue
Block a user