Skip to content

Conversation

@ruslandoga
Copy link
Contributor

@ruslandoga ruslandoga commented Oct 21, 2024

This PR updates Erlang/Elixir/Alpine versions to the current latest.

Context: #44 (comment)

@ruslandoga ruslandoga mentioned this pull request Oct 21, 2024
6 tasks
Dockerfile Outdated
# prepare release image
FROM alpine:3.17.3 AS app
FROM alpine:3.20.3 AS app
RUN apk add --no-cache --update bash openssl libstdc++
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also install ca-certificates (for the new public_key.cacerts_get) and ncurses (I never learned why it is needed in Erlang, but I think my apps fail to start when it's missing)?

@ruslandoga ruslandoga marked this pull request as draft October 21, 2024 08:52
@ruslandoga ruslandoga marked this pull request as ready for review November 10, 2024 06:24
hexdocs: [
include_executables_for: [:unix]
include_executables_for: [:unix],
reboot_system_after_config: true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This preserves config/releases.exs behavior: https://hexdocs.pm/mix/Mix.Tasks.Release.html#module-config-providers

@ericmj
Copy link
Member

ericmj commented Nov 12, 2024

There's a CI failure related to the config, I think you have to rename it to runtime.exs.

@ruslandoga
Copy link
Contributor Author

Hm... I have renamed it.

The CI error

** (System.EnvError) could not fetch environment variable "HEXDOCS_PORT" because it is not set
    (elixir 1.17.3) lib/system.ex:705: System.fetch_env!/1
    /home/runner/work/hexdocs/hexdocs/config/runtime.exs:4: (file)
    (stdlib 6.1.2) erl_eval.erl:904: :erl_eval.do_apply/7
    (stdlib 6.1.2) erl_eval.erl:1192: :erl_eval.expr_list/7
    (stdlib 6.1.2) erl_eval.erl:446: :erl_eval.expr/6
    (stdlib 6.1.2) erl_eval.erl:436: :erl_eval.expr/6
    (stdlib 6.1.2) erl_eval.erl:1192: :erl_eval.expr_list/7

seems like a permissions issue.

@wojtekmach
Copy link
Member

releases.exs was only evaluated in releases, runtime.exs is evaluated across the board including when we run tests. Adding if config_env() == :prod inside the file should fix it.

@ruslandoga
Copy link
Contributor Author

@wojtekmach thank you!

@wojtekmach wojtekmach merged commit 7886090 into hexpm:main Nov 12, 2024
1 check passed
@wojtekmach
Copy link
Member

Thank you!

@ruslandoga ruslandoga deleted the update-runtime branch November 12, 2024 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants