diff --git a/Dockerfile b/Dockerfile index a0084d60..b6d4f9ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,13 +7,13 @@ # This file is based on these images: # # - https://hub.docker.com/r/hexpm/elixir/tags - for the build image -# - https://hub.docker.com/_/debian?tab=tags&page=1&name=bullseye-20231009-slim - for the release image +# - https://hub.docker.com/_/debian?tab=tags&page=1&name=bullseye-20240612-slim - for the release image # - https://pkgs.org/ - resource for finding needed packages -# - Ex: hexpm/elixir:1.15.7-erlang-26.0.2-debian-bullseye-20231009-slim +# - Ex: hexpm/elixir:1.17.1-erlang-26.2.5-debian-bullseye-20240612-slim # ARG ELIXIR_VERSION=1.17.1 -ARG OTP_VERSION=26.2.5.1 -ARG DEBIAN_VERSION=bookworm-20240701-slim +ARG OTP_VERSION=26.2.5 +ARG DEBIAN_VERSION=bullseye-20240612-slim ARG BUILDER_IMAGE="hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION}-debian-${DEBIAN_VERSION}" ARG RUNNER_IMAGE="debian:${DEBIAN_VERSION}" @@ -68,8 +68,8 @@ RUN mix release FROM ${RUNNER_IMAGE} RUN apt-get update -y && \ - apt-get install -y libstdc++6 openssl libncurses5 locales ca-certificates \ - && apt-get clean && rm -f /var/lib/apt/lists/*_* + apt-get install -y libstdc++6 openssl libncurses5 locales ca-certificates \ + && apt-get clean && rm -f /var/lib/apt/lists/*_* # Set the locale RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen diff --git a/fly.toml b/fly.toml index 63ca9137..a807e748 100644 --- a/fly.toml +++ b/fly.toml @@ -23,7 +23,13 @@ kill_signal = "SIGTERM" auto_start_machines = true min_machines_running = 0 processes = ["app"] + [http_service.concurrency] type = "connections" hard_limit = 1000 soft_limit = 1000 + +[[vm]] + memory = "512mb" + cpu_kind = "shared" + cpus = 1 diff --git a/rel/env.sh.eex b/rel/env.sh.eex index 2bdface8..efeb7ffa 100755 --- a/rel/env.sh.eex +++ b/rel/env.sh.eex @@ -6,3 +6,8 @@ export ECTO_IPV6="true" export DNS_CLUSTER_QUERY="${FLY_APP_NAME}.internal" export RELEASE_DISTRIBUTION="name" export RELEASE_NODE="${FLY_APP_NAME}-${FLY_IMAGE_REF##*-}@${FLY_PRIVATE_IP}" + +# Uncomment to send crash dumps to stderr +# This can be useful for debugging, but may log sensitive information +# export ERL_CRASH_DUMP=/dev/stderr +# export ERL_CRASH_DUMP_BYTES=4096 diff --git a/rel/overlays/bin/migrate b/rel/overlays/bin/migrate index 05ca5eb7..e5ac5352 100755 --- a/rel/overlays/bin/migrate +++ b/rel/overlays/bin/migrate @@ -1,3 +1,5 @@ #!/bin/sh +set -eu + cd -P -- "$(dirname -- "$0")" exec ./radiator eval Radiator.Release.migrate diff --git a/rel/overlays/bin/server b/rel/overlays/bin/server index a8b2c162..08e20e15 100755 --- a/rel/overlays/bin/server +++ b/rel/overlays/bin/server @@ -1,3 +1,5 @@ #!/bin/sh +set -eu + cd -P -- "$(dirname -- "$0")" PHX_SERVER=true exec ./radiator start