From 7f66d37606a96f26e8819045bfb25626be5e0294 Mon Sep 17 00:00:00 2001 From: Mayel de Borniol Date: Sun, 20 Oct 2024 19:59:32 +0100 Subject: [PATCH] rel --- .dockerignore | 3 ++- Dockerfile.release | 4 ++-- deps-alpine-build.sh | 5 ++++- flavours/classic/config/config.exs | 2 ++ mix.exs | 2 +- mix.lock | 6 +++--- 6 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.dockerignore b/.dockerignore index 6e762a8933..2f402c525a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,7 +4,7 @@ docs/exdoc .hex .mix .npm -.git +./.git .gitignore .config .cache @@ -40,6 +40,7 @@ forks/*/_build forks/*/deps forks/*/assets/node_modules deps/*/_build +deps/*/cache/ extensions/*/data/postgres extensions/*/.git extensions/*/.config diff --git a/Dockerfile.release b/Dockerfile.release index 1848738cb4..c7bee38b78 100644 --- a/Dockerfile.release +++ b/Dockerfile.release @@ -127,7 +127,7 @@ COPY --link lib lib # RUN ls -la assets/static # workaround for compilation errors (eg. "could not load module Needle.UID due to reason :unavailable") -RUN MIX_ENV=prod mix deps.clean needle_uid jason poison --build +RUN MIX_ENV=prod mix deps.clean needle_uid jason poison bonfire --build RUN MIX_ENV=prod mix deps.compile --include-children needle_uid needle_ulid paper_trail # compile protocols (attempted fix for 'could not load module Poison.Encoder due to reason :unavailable') @@ -167,7 +167,7 @@ RUN MIX_ENV=prod CI=1 mix phx.digest RUN ls -la priv/static RUN ls -la priv/static/assets -RUN tar --exclude=*.env --exclude=.git --exclude=node_modules --exclude=priv/static/source.tar.gz --exclude=priv/static/data --exclude=*/*/assets/static/data -czvf priv/static/source.tar.gz lib deps apps extensions forks config docs priv/repo priv/static mix.exs mix.lock LICENSE || echo "Could not prepare code archive" +RUN tar --exclude=*.env --exclude=.git --exclude=node_modules --exclude=priv/static/source.tar.gz --exclude=priv/static/data --exclude=*/*/assets/static/data --exclude=deps/*/cache -czvf priv/static/source.tar.gz lib deps apps extensions forks config docs priv/repo priv/static mix.exs mix.lock LICENSE || echo "Could not prepare code archive" # build final OTP release RUN MIX_ENV=prod CI=1 mix release diff --git a/deps-alpine-build.sh b/deps-alpine-build.sh index df11f73889..b30e363fdd 100644 --- a/deps-alpine-build.sh +++ b/deps-alpine-build.sh @@ -4,5 +4,8 @@ chmod +x ./deps-alpine.sh ./deps-alpine.sh -apk add --update --no-cache just elixir tar file mailcap make build-base libc-dev sqlite npm yarn +# NOTE: we don't install erlang/elixir here because we assume that we're running this script in an environment (eg docker image) that already has these installed +# apk add --update --no-cache elixir erlang + +apk add --update --no-cache just tar file mailcap make build-base libc-dev sqlite npm yarn # rust cargo gcc diff --git a/flavours/classic/config/config.exs b/flavours/classic/config/config.exs index edb4d7128a..9458e846c7 100644 --- a/flavours/classic/config/config.exs +++ b/flavours/classic/config/config.exs @@ -360,3 +360,5 @@ import_config "native.exs" # finally, append/override config based on env, which will override any config set above (including from imported files) import_config "#{env}.exs" + +IO.puts("Compile-time config ready") \ No newline at end of file diff --git a/mix.exs b/mix.exs index b984cd5baa..f956586f23 100644 --- a/mix.exs +++ b/mix.exs @@ -208,7 +208,7 @@ defmodule Bonfire.Umbrella.MixProject do # TODO: put these in ENV or an external writeable config file similar to deps.* @config [ # note that the flavour will automatically be added where the dash appears - version: "0.9.10-beta.165", + version: "0.9.10-beta.166", elixir: ">= #{System.get_env("ELIXIR_VERSION", "1.13.4")}", flavour: @flavour, default_flavour: @default_flavour, diff --git a/mix.lock b/mix.lock index 1d0f0d5622..f8601ed106 100644 --- a/mix.lock +++ b/mix.lock @@ -30,7 +30,7 @@ "blurhash": {:hex, :rinpatch_blurhash, "0.1.0", "01a888b0f5f1f382ab52e4396f01831cbe8486ea5828604c90f4dac533d39a4b", [:mix], [{:mogrify, "~> 0.8.0", [hex: :mogrify, repo: "hexpm", optional: true]}], "hexpm", "19911a5dcbb0acb9710169a72f702bce6cb048822b12de566ccd82b2cc42b907"}, "bolt_sips": {:hex, :bolt_sips, "2.0.11", "a1cb78d8db4aba750f6771a9fd4a10b3300618b7b0433b12105c64d21d27b4ba", [:mix], [{:calendar, "~> 0.17.2", [hex: :calendar, repo: "hexpm", optional: false]}, {:db_connection, "~> 2.4", [hex: :db_connection, repo: "hexpm", optional: false]}, {:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: false]}, {:poison, "~> 3.1", [hex: :poison, repo: "hexpm", optional: false]}], "hexpm", "227a6669e14fa6d331738857b32b5cd022b4c13808e947ccfec8eccb8fedb0e5"}, "bones": {:git, "https://github.com/bonfire-networks/bones", "450d974c40c8adabdb2111c67521c33c878f117c", []}, - "bonfire": {:git, "https://github.com/bonfire-networks/bonfire", "d43b2a583d199395c20e4907c5061d89c1cbb044", []}, + "bonfire": {:git, "https://github.com/bonfire-networks/bonfire", "aa2a3c08c8e47fb3d11f36ac20c28f8a275396c5", []}, "bonfire_api_graphql": {:git, "https://github.com/bonfire-networks/bonfire_api_graphql", "44bd5e7cabec6b01a5808ed8e42b9676e145c9dc", []}, "bonfire_boundaries": {:git, "https://github.com/bonfire-networks/bonfire_boundaries", "8cdbc87dc6f1d4ac7bc5d7d20523f07a5a6ee9dc", []}, "bonfire_breadpub": {:git, "https://github.com/bonfire-networks/bonfire_breadpub", "16200f6972a7658ec27729f56c368f13966d5417", []}, @@ -49,7 +49,7 @@ "bonfire_fail": {:git, "https://github.com/bonfire-networks/bonfire_fail", "78a25ab4e7a5651522fd3eade6f2d3bc952c0ac3", []}, "bonfire_federate_activitypub": {:git, "https://github.com/bonfire-networks/bonfire_federate_activitypub", "bfc59cc660e5fb4e3286508b877a92c5e4ebcddf", []}, "bonfire_files": {:git, "https://github.com/bonfire-networks/bonfire_files", "22559ad34c0be1ab31fa0e03a61806f439c7fa03", []}, - "bonfire_geolocate": {:git, "https://github.com/bonfire-networks/bonfire_geolocate", "ebc3aade28ceeb976c72ea7078de75bdee314b07", []}, + "bonfire_geolocate": {:git, "https://github.com/bonfire-networks/bonfire_geolocate", "98a16d7002ded7d7208aaf8bfa4ad7b4e2441d13", []}, "bonfire_invite_links": {:git, "https://github.com/bonfire-networks/bonfire_invite_links", "d6233642693cd330101e27736e91455248118a0e", []}, "bonfire_label": {:git, "https://github.com/bonfire-networks/bonfire_label", "efcf18f1fa185bb62f07e3e44518029a7e9a82db", []}, "bonfire_mailer": {:git, "https://github.com/bonfire-networks/bonfire_mailer", "71e25f18bdb8d0923a641884a905959bc02c34e6", []}, @@ -364,7 +364,7 @@ "towel": {:git, "https://github.com/CyrusOfEden/towel", "7a9632f6450593176db387c8202580b626b57760", []}, "twinkle_star": {:git, "https://github.com/bonfire-networks/twinkle_star", "476f464e38c5409438246ca15e42e44b527ca257", []}, "typed_struct": {:hex, :typed_struct, "0.3.0", "939789e3c1dca39d7170c87f729127469d1315dcf99fee8e152bb774b17e7ff7", [:mix], [], "hexpm", "c50bd5c3a61fe4e198a8504f939be3d3c85903b382bde4865579bc23111d1b6d"}, - "tz_world": {:hex, :tz_world, "1.4.0", "b0ca0dbf5f25661269e7eb8719f46dcc48042b47e579aad6463a5fe33d98f48f", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.5", [hex: :certifi, repo: "hexpm", optional: true]}, {:geo, "~> 1.0 or ~> 2.0 or ~> 3.3 or ~> 4.0", [hex: :geo, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "b32dc69764f6984c2ae53efda4ecdecce5e15e66fbf4956f7b2a66fd798786cb"}, + "tz_world": {:hex, :tz_world, "1.3.3", "6d847a8f24d84f091d3385769dad96a27170e8e9a03f5ded9fd86299a99c67b1", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.5", [hex: :certifi, repo: "hexpm", optional: true]}, {:geo, "~> 1.0 or ~> 2.0 or ~> 3.3", [hex: :geo, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "dae9f255954c767fa4e36fa68b2927310a7192b525e10f860a6f4656aab23746"}, "tzdata": {:hex, :tzdata, "1.1.2", "45e5f1fcf8729525ec27c65e163be5b3d247ab1702581a94674e008413eef50b", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "cec7b286e608371602318c414f344941d5eb0375e14cfdab605cca2fe66cba8b"}, "ucwidth": {:hex, :ucwidth, "0.2.0", "1f0a440f541d895dff142275b96355f7e91e15bca525d4a0cc788ea51f0e3441", [:mix], [], "hexpm", "c1efd1798b8eeb11fb2bec3cafa3dd9c0c3647bee020543f0340b996177355bf"}, "unfurl": {:hex, :unfurl, "0.6.2", "28a60b4bed73f8ebfd699f38e4762e3a757bc28a1c9bd76d8037db3b2d81ea5e", [:mix], [{:arrows, "~> 0.2", [hex: :arrows, repo: "hexpm", optional: false]}, {:faviconic, "~> 0.2.1", [hex: :faviconic, repo: "hexpm", optional: false]}, {:floki, "~> 0.32", [hex: :floki, repo: "hexpm", optional: false]}, {:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: false]}, {:tesla, "~> 1.4", [hex: :tesla, repo: "hexpm", optional: false]}, {:untangle, "~> 0.3", [hex: :untangle, repo: "hexpm", optional: false]}], "hexpm", "0b5a58870a4b2dc8005a4856663176c1ff8f65ee4585c8bb0ad23f51c55abd86"},