mirror of
https://github.com/bonfire-networks/bonfire-app.git
synced 2024-05-15 15:42:39 +00:00
Update to elixir 1.15 and switch to hex.pm image for docker
This commit is contained in:
parent
21aa9da73d
commit
e24dd97fef
2
.github/workflows/docs.yaml
vendored
2
.github/workflows/docs.yaml
vendored
|
@ -8,7 +8,7 @@ jobs:
|
|||
docs:
|
||||
name: Generate docs upon new release
|
||||
runs-on: ubuntu-latest
|
||||
container: elixir:1.14-alpine
|
||||
container: hexpm/elixir:1.15.0-erlang-26.0.1-alpine-3.18.2
|
||||
env:
|
||||
FLAVOUR: classic
|
||||
FLAVOUR_PATH: flavours/classic
|
||||
|
|
4
.github/workflows/test.yaml
vendored
4
.github/workflows/test.yaml
vendored
|
@ -11,7 +11,7 @@ jobs:
|
|||
test_classic_flavour:
|
||||
name: Test classic flavour
|
||||
runs-on: ubuntu-latest
|
||||
container: elixir:1.14-alpine
|
||||
container: hexpm/elixir:1.15.0-erlang-26.0.1-alpine-3.18.2
|
||||
env:
|
||||
FLAVOUR: classic
|
||||
MIX_ENV: test
|
||||
|
@ -98,7 +98,7 @@ jobs:
|
|||
# test_cooperation_flavour:
|
||||
# name: Test cooperation flavour
|
||||
# runs-on: ubuntu-latest
|
||||
# container: elixir:1.13-alpine
|
||||
# container: hexpm/elixir:1.15.0-erlang-26.0.1-alpine-3.18.2
|
||||
# env:
|
||||
# FLAVOUR: cooperation
|
||||
# MIX_ENV: test
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
erlang 26.0
|
||||
elixir 1.14.5-otp-26
|
||||
#elixir 1.15.0-rc.1-otp-25
|
||||
erlang 26.0.1
|
||||
elixir 1.15.0-otp-26
|
||||
just 1.14.0
|
||||
yarn 1.22.19
|
||||
nodejs 20.2.0
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
# stage to build the dependency manager
|
||||
ARG FLAVOUR
|
||||
ARG FLAVOUR_PATH
|
||||
ARG ELIXIR_VERSION
|
||||
|
||||
FROM elixir:1.14-alpine
|
||||
FROM hexpm/elixir:${ELIXIR_VERSION}
|
||||
|
||||
ENV HOME=/opt/app/ TERM=xterm USER=docker
|
||||
WORKDIR $HOME
|
||||
|
|
|
@ -1,21 +1,4 @@
|
|||
# Define what version of Elixir to use - ATTENTION: when changing Elixir version
|
||||
# make sure to update the `ALPINE_VERSION` arg to match,
|
||||
# as well as the Elixir version in:
|
||||
# - mix.exs
|
||||
# - .github/workflows/test.yaml or .gitlab-ci.yml
|
||||
# - Dockerfile.dev
|
||||
# - .tool-versions
|
||||
ARG ELIXIR_IMAGE=1.14-alpine
|
||||
|
||||
# The version of Alpine to use for the final image
|
||||
# This should match the version of Alpine that the current elixir & erlang images (in Step 1) use.
|
||||
# To find this you need to:
|
||||
# 1. Locate the dockerfile for the elixir image matching the version, and check what erlang version it uses
|
||||
# e.g. https://github.com/erlef/docker-elixir/blob/master/1.14/alpine/Dockerfile
|
||||
# 2. Locate the corresponding dockerfile for the erlang version used, and check what alpine version it uses, and then copy that number into the ARG below:
|
||||
# e.g. https://github.com/erlang/docker-erlang-otp/blob/master/25/alpine/Dockerfile
|
||||
# TODO! switch to image from hex.pm which don't randombly change Alpine version on an existing label
|
||||
ARG ALPINE_VERSION=3.17
|
||||
|
||||
# The following are build arguments used to change variable parts of the image, they should be set as env variables.
|
||||
# The name of your application/release (required)
|
||||
|
@ -24,9 +7,11 @@ ARG APP_NAME
|
|||
ARG APP_VSN
|
||||
ARG FLAVOUR
|
||||
ARG FLAVOUR_PATH
|
||||
ARG ELIXIR_VERSION
|
||||
ARG ALPINE_VERSION
|
||||
|
||||
#### STEP 1 - Build our app
|
||||
FROM elixir:${ELIXIR_IMAGE} as builder
|
||||
FROM hexpm/elixir:${ELIXIR_VERSION} as builder
|
||||
|
||||
# necessary utils + dependencies for comeonin
|
||||
RUN apk --update add tar curl git rust cargo npm yarn bash make gcc libc-dev openssl-dev
|
||||
|
|
|
@ -294,7 +294,9 @@ common = fn names ->
|
|||
for name <- List.wrap(names) do
|
||||
with nil <- common_assocs[name],
|
||||
do:
|
||||
raise(RuntimeError, message: "Expected a common association name, got #{inspect(name)}")
|
||||
raise(RuntimeError,
|
||||
message: "Expected a common association name, got #{inspect(name)}"
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ if (config_env() == :prod or System.get_env("OTEL_ENABLED") == "1") and
|
|||
:opentelemetry_exporter,
|
||||
%{
|
||||
endpoints: [
|
||||
{:https, 'api.honeycomb.io', 443,
|
||||
{:https, ~c"api.honeycomb.io", 443,
|
||||
[
|
||||
verify: :verify_peer,
|
||||
cacertfile: :certifi.cacertfile(),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
defmodule Bonfire.Boundaries.Repo.Migrations.BoundariesFixtures do
|
||||
defmodule Bonfire.Boundaries.Repo.Migrations.BoundariesFixturesUp do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
10
justfile
10
justfile
|
@ -22,6 +22,16 @@ WITH_DOCKER := env_var_or_default('WITH_DOCKER', "total")
|
|||
MIX_ENV := env_var_or_default('MIX_ENV', "dev")
|
||||
|
||||
APP_NAME := "bonfire"
|
||||
|
||||
# The version of Alpine to use for the final image - should match the version of Alpine used in the ELIXIR_VERSION below:
|
||||
ALPINE_VERSION := env_var_or_default('ALPINE_VERSION', "3.18.2")
|
||||
ELIXIR_VERSION := env_var_or_default('APP_DOCKER_IMAGE', "1.15.0-erlang-26.0.1-alpine-"+ALPINE_VERSION)
|
||||
# ^ Defines what version of Elixir to use - ATTENTION: when changing Elixir version make sure to update the `ALPINE_VERSION` arg to match, as well as the Elixir version in:
|
||||
# - .tool-versions
|
||||
# - Dockerfile.dev
|
||||
# - .github/workflows/test.yaml and/or .gitlab-ci.yml
|
||||
# - mix.exs
|
||||
|
||||
APP_DOCKER_REPO := "bonfirenetworks/"+APP_NAME
|
||||
APP_DOCKER_REPO_ALT := "ghcr.io/bonfire-networks/bonfire-app"
|
||||
|
||||
|
|
2
mix.exs
2
mix.exs
|
@ -89,7 +89,7 @@ defmodule Bonfire.Umbrella.MixProject do
|
|||
@config [
|
||||
# note that the flavour will automatically be added where the dash appears
|
||||
version: "0.9.4-beta.19",
|
||||
elixir: "~> 1.13",
|
||||
elixir: "~> #{System.get_env("ELIXIR_VERSION", "1.14")}",
|
||||
default_flavour: @default_flavour,
|
||||
logo: "assets/static/images/bonfire-icon.png",
|
||||
guides: [
|
||||
|
|
Loading…
Reference in a new issue