Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
- name: Install OTP and Elixir
uses: erlef/setup-beam@v1
with:
otp-version: 25.3.1
elixir-version: 1.14.2
otp-version: 27.1.2
elixir-version: 1.17.3

- name: Install dependencies
run: |
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM hexpm/elixir:1.14.2-erlang-25.3.1-alpine-3.17.3 as build
FROM hexpm/elixir:1.17.3-erlang-27.1.2-alpine-3.20.3 as build

# install build dependencies
RUN apk add --no-cache --update git
Expand Down Expand Up @@ -30,8 +30,8 @@ COPY rel rel
RUN mix release

# prepare release image
FROM alpine:3.17.3 AS app
RUN apk add --no-cache --update bash openssl libstdc++
FROM alpine:3.20.3 AS app
RUN apk add --no-cache --update bash openssl libgcc libstdc++ ncurses

RUN mkdir /app
WORKDIR /app
Expand Down
31 changes: 0 additions & 31 deletions config/releases.exs

This file was deleted.

33 changes: 33 additions & 0 deletions config/runtime.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import Config

if config_env() == :prod do
config :hexdocs,
port: System.fetch_env!("HEXDOCS_PORT"),
hexpm_url: System.fetch_env!("HEXDOCS_HEXPM_URL"),
hexpm_secret: System.fetch_env!("HEXDOCS_HEXPM_SECRET"),
fastly_key: System.fetch_env!("HEXDOCS_FASTLY_KEY"),
fastly_hexdocs: System.fetch_env!("HEXDOCS_FASTLY_HEXDOCS"),
queue_id: System.fetch_env!("HEXDOCS_QUEUE_ID"),
session_key_base: System.fetch_env!("HEXDOCS_SESSION_KEY_BASE"),
session_signing_salt: System.fetch_env!("HEXDOCS_SESSION_SIGNING_SALT"),
session_encryption_salt: System.fetch_env!("HEXDOCS_SESSION_ENCRYPTION_SALT"),
queue_concurrency: String.to_integer(System.fetch_env!("HEXDOCS_QUEUE_CONCURRENCY")),
host: System.fetch_env!("HEXDOCS_HOST")

config :hexdocs, :repo_bucket, name: System.fetch_env!("HEXDOCS_REPO_BUCKET")

config :hexdocs, :docs_private_bucket, name: System.fetch_env!("HEXDOCS_DOCS_PRIVATE_BUCKET")

config :hexdocs, :docs_public_bucket, name: System.fetch_env!("HEXDOCS_DOCS_PUBLIC_BUCKET")

config :ex_aws,
access_key_id: System.fetch_env!("HEXDOCS_AWS_ACCESS_KEY_ID"),
secret_access_key: System.fetch_env!("HEXDOCS_AWS_ACCESS_KEY_SECRET")

config :rollbax,
access_token: System.fetch_env!("HEXDOCS_ROLLBAR_ACCESS_TOKEN")

config :kernel,
inet_dist_listen_min: String.to_integer(System.fetch_env!("BEAM_PORT")),
inet_dist_listen_max: String.to_integer(System.fetch_env!("BEAM_PORT"))
end
5 changes: 3 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule Hexdocs.MixProject do
[
app: :hexdocs,
version: "0.1.0",
elixir: "~> 1.14",
elixir: "~> 1.17",
start_permanent: Mix.env() == :prod,
releases: releases(),
deps: deps()
Expand Down Expand Up @@ -42,7 +42,8 @@ defmodule Hexdocs.MixProject do
defp releases() do
[
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

]
]
end
Expand Down