From 4394d4721ccd5d9b503d01918ff3d6e5d6744c9d Mon Sep 17 00:00:00 2001 From: Simponic Date: Sun, 29 Jan 2023 17:14:55 -0700 Subject: [PATCH] Add prod to git, move back to no-one user in server docker container --- Dockerfile | 3 +-- config/.gitignore | 1 - config/prod.exs | 12 ++++++++++++ 3 files changed, 13 insertions(+), 3 deletions(-) delete mode 100644 config/.gitignore create mode 100644 config/prod.exs diff --git a/Dockerfile b/Dockerfile index 6ef0845..5ca4aff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -69,8 +69,7 @@ ENV MIX_ENV="prod" COPY --from=builder --chown=nobody:root /app/_build/${MIX_ENV}/rel/chessh ./ COPY --from=builder --chown=nobody:root /app/priv /app/priv -# USER nobody -USER root +USER nobody EXPOSE 8080 EXPOSE 34355 diff --git a/config/.gitignore b/config/.gitignore deleted file mode 100644 index e6fa00c..0000000 --- a/config/.gitignore +++ /dev/null @@ -1 +0,0 @@ -prod.exs \ No newline at end of file diff --git a/config/prod.exs b/config/prod.exs new file mode 100644 index 0000000..bb12243 --- /dev/null +++ b/config/prod.exs @@ -0,0 +1,12 @@ +import Config + +config :logger, + level: :warning, + truncate: 4096 + +config :chessh, RateLimits, + jail_timeout_ms: 5 * 60 * 1000, + jail_attempt_threshold: 15, + max_concurrent_user_sessions: 5, + player_session_message_burst_ms: 750, + player_session_message_burst_rate: 8