diff --git a/Dockerfile b/Dockerfile index 76bc019..e359672 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,9 +53,14 @@ USER nobody:nobody COPY --from=build --chown=nobody:nobody /app/_build/prod/rel/app ./ -ENV HOME=/app -ENV MIX_ENV=prod -ENV SECRET_KEY_BASE=nokey -ENV PORT=4000 +# set runner ENV +ENV MIX_ENV="prod" + +# Only copy the final release from the build stage +COPY --from=build --chown=nobody:root /app/_build/${MIX_ENV}/rel/app ./ + +CMD ["/app/bin/server"] -CMD ["bin/app", "start"] \ No newline at end of file +# Appended by flyctl +ENV ECTO_IPV6 true +ENV ERL_AFLAGS "-proto_dist inet6_tcp" \ No newline at end of file diff --git a/fly.toml b/fly.toml index 4b97b2e..a0d1763 100644 --- a/fly.toml +++ b/fly.toml @@ -14,11 +14,11 @@ processes = [] auto_rollback = true [[services]] - http_checks = [] + # http_checks = [] internal_port = 8080 processes = ["app"] protocol = "tcp" - script_checks = [] + # script_checks = [] [services.concurrency] hard_limit = 25 soft_limit = 20 @@ -34,7 +34,7 @@ processes = [] port = 443 [[services.tcp_checks]] - grace_period = "1s" + grace_period = "3s" interval = "15s" - restart_limit = 0 + restart_limit = 6 timeout = "2s"