This commit is contained in:
Mayel de Borniol 2024-04-16 22:13:38 +01:00
parent a57ad00dd1
commit f0e6222a43
8 changed files with 52 additions and 39 deletions

View file

@ -12,7 +12,12 @@ ARG FLAVOUR_PATH
ARG FORKS_TO_COPY_PATH
# necessary utils + dependencies for comeonin
RUN apk --update add tar curl git rust cargo npm yarn bash make gcc libc-dev openssl-dev
COPY --link deps-alpine.sh ./
COPY --link deps-alpine-build.sh ./
RUN chmod +x ./*.sh
RUN sh deps-alpine-build.sh
# RUN apk --update add tar curl git rust cargo npm yarn bash make gcc libc-dev openssl-dev
ENV HOME=/opt/app/ TERM=xterm MIX_ENV=prod FLAVOUR_PATH=./
WORKDIR $HOME
@ -156,29 +161,33 @@ FROM alpine:${ALPINE_VERSION}
ENV APP_REVISION=${APP_VSN}-${APP_BUILD}
# Essentials
RUN apk add --update --no-cache \
mailcap \
ca-certificates \
openssh-client \
openssl-dev \
# ^ for HTTPS, etc
git \
# build-base \
# ^ required by tree_magic
tzdata \
gettext \
# ^ localisation
imagemagick \
vips-tools \
poppler-utils \
# ^ image resizing
bash \
curl
#^ misc
WORKDIR /opt/app
# Essentials
COPY --link deps-alpine.sh ./
RUN chmod +x ./deps-alpine.sh
RUN sh deps-alpine.sh
# RUN apk add --update --no-cache \
# mailcap \
# ca-certificates \
# openssh-client \
# openssl-dev \
# # ^ for HTTPS, etc
# git \
# # build-base \
# # ^ required by tree_magic
# tzdata \
# gettext \
# # ^ localisation
# imagemagick \
# vips-tools \
# poppler-utils \
# # ^ image resizing
# bash \
# curl
# #^ misc
# copy app build
COPY --from=builder /opt/app/_build/prod/rel/bonfire /opt/app
COPY --from=builder /opt/app/flavours/ /opt/app/flavours/

8
deps-alpine-build.sh Normal file
View file

@ -0,0 +1,8 @@
#!/bin/bash
# runtime deps
chmod +x ./deps-alpine.sh
./deps-alpine.sh
apk add --update --no-cache just elixir tar file mailcap make build-base gcc libc-dev rust cargo sqlite npm yarn

View file

@ -1,4 +0,0 @@
apk add bash git tar file build-base gcc sqlite npm mailcap ca-certificates openssl-dev tzdata gettext curl rust cargo just libc-dev elixir
mix local.hex --force
mix local.rebar --force

View file

@ -1,4 +1,3 @@
apk add bash git tar file build-base gcc sqlite npm mailcap ca-certificates openssl-dev tzdata gettext curl rust cargo just libc-dev elixir
#!/bin/sh
mix local.hex --force
mix local.rebar --force
apk add --update --no-cache mailcap ca-certificates openssh-client openssl-dev git tzdata gettext imagemagick vips-tools poppler-utils bash curl

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
apt-get update -q -y

View file

@ -119,8 +119,8 @@ config :bonfire_umbrella, Bonfire.Common.TestInstanceRepo,
# config :query_elf, :id_types, [:id, :binary_id, Needle.ULID]
# disable Tzdata and replace with Tz library
config :tzdata, :autoupdate, :disabled
config :elixir, :time_zone_database, Tz.TimeZoneDatabase
# config :tzdata, :autoupdate, :disabled
# config :elixir, :time_zone_database, Tz.TimeZoneDatabase # FIXME: disabled for now because crashes on Yunohost / Debian 11
config :logger,
handle_otp_reports: true,

View file

@ -27,7 +27,7 @@ defmodule Bonfire.Umbrella.MixProject do
do: [
{:bonfire_api_graphql,
git: "https://github.com/bonfire-networks/bonfire_api_graphql"},
{:absinthe_client,
{:absinthe_client,
git: "https://github.com/bonfire-networks/absinthe_client"}
],
else: []
@ -133,7 +133,8 @@ defmodule Bonfire.Umbrella.MixProject do
umbrella_root?: @use_local_forks,
umbrella_path: @umbrella_path
)
# |> IO.inspect(limit: :infinity)
# |> IO.inspect(limit: :infinity)
@extra_release_apps @deps
|> Enum.filter(fn
@ -157,7 +158,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.61",
version: "0.9.10-beta.62",
elixir: ">= #{System.get_env("ELIXIR_VERSION", "1.13.4")}",
flavour: @flavour,
default_flavour: @default_flavour,

View file

@ -26,7 +26,7 @@
"benchee_json": {:hex, :benchee_json, "1.0.0", "cc661f4454d5995c08fe10dd1f2f72f229c8f0fb1c96f6b327a8c8fc96a91fe5", [:mix], [{:benchee, ">= 0.99.0 and < 2.0.0", [hex: :benchee, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "da05d813f9123505f870344d68fb7c86a4f0f9074df7d7b7e2bb011a63ec231c"},
"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"},
"bonfire": {:git, "https://github.com/bonfire-networks/bonfire_spark", "9b5b9a8b59bcd91d06f92a8b97fc3d34aeb20d0a", []},
"bonfire": {:git, "https://github.com/bonfire-networks/bonfire_spark", "7e724f6141c5b4f1af8b913d63386af83b747208", []},
"bonfire_api_graphql": {:git, "https://github.com/bonfire-networks/bonfire_api_graphql", "2d6735a8db353d554458a631c17a235a71f75744", []},
"bonfire_boundaries": {:git, "https://github.com/bonfire-networks/bonfire_boundaries", "ce2be9b35140ebb58f099a33a61f8725d7bdc055", []},
"bonfire_breadpub": {:git, "https://github.com/bonfire-networks/bonfire_breadpub", "fefec42495858c15d7e033bb8979e8f4996af00c", []},
@ -40,7 +40,7 @@
"bonfire_data_shared_user": {:git, "https://github.com/bonfire-networks/bonfire_data_shared_user", "59c4c6da424a0071b462020ebd36c6778c695324", [branch: "main"]},
"bonfire_data_social": {:git, "https://github.com/bonfire-networks/bonfire_data_social", "19dab1cdf0c2d0c3e48e532d2d15c051bdef2bc8", []},
"bonfire_ecto": {:git, "https://github.com/bonfire-networks/bonfire_ecto", "f41f531b735e3186b752d9aef12145499c8e577b", []},
"bonfire_editor_milkdown": {:git, "https://github.com/bonfire-networks/bonfire_editor_milkdown", "4672b62c29ea0edf183f9cc988311d41f8b4a299", []},
"bonfire_editor_milkdown": {:git, "https://github.com/bonfire-networks/bonfire_editor_milkdown", "6f3089cefc385e69e9cb35ed50d8cea5ae44d77d", []},
"bonfire_epics": {:git, "https://github.com/bonfire-networks/bonfire_epics", "8d5506a49b91f4ba311b6684772e3ba30b7717af", []},
"bonfire_fail": {:git, "https://github.com/bonfire-networks/bonfire_fail", "b993bc2888e42a0bc4e6e6d30f4141e7a610738c", []},
"bonfire_federate_activitypub": {:git, "https://github.com/bonfire-networks/bonfire_federate_activitypub", "b6d7e7ef72f28fa83e58a329df3f4d993493f1df", []},
@ -64,7 +64,7 @@
"bonfire_ui_coordination": {:git, "https://github.com/bonfire-networks/bonfire_ui_coordination", "24fb0d3d58aedfef1e3ae971fd549c2e9d056871", []},
"bonfire_ui_groups": {:git, "https://github.com/bonfire-networks/bonfire_ui_groups", "5b39878ded3bc5640378574483e72f61caebb99a", []},
"bonfire_ui_kanban": {:git, "https://github.com/bonfire-networks/bonfire_ui_kanban", "774f634577b1234695a617d1aed63ecc21cd8c42", []},
"bonfire_ui_me": {:git, "https://github.com/bonfire-networks/bonfire_ui_me", "f066d6ca881aee477651b9b7b167f35d6e54cd06", []},
"bonfire_ui_me": {:git, "https://github.com/bonfire-networks/bonfire_ui_me", "05bea07f5110e7815ee7a4503013966672deb128", []},
"bonfire_ui_messages": {:git, "https://github.com/bonfire-networks/bonfire_ui_messages", "606402f2e45b46ae68abaf0c9ad5600132c0f231", []},
"bonfire_ui_moderation": {:git, "https://github.com/bonfire-networks/bonfire_ui_moderation", "aa56d61e7b521dbb5ec849f587967cd32142f56e", []},
"bonfire_ui_posts": {:git, "https://github.com/bonfire-networks/bonfire_ui_posts", "21881f865dce6c06d83e6e2daf9e918e2af4d1e7", []},
@ -272,7 +272,7 @@
"phoenix_pubsub": {:hex, :phoenix_pubsub, "2.1.3", "3168d78ba41835aecad272d5e8cd51aa87a7ac9eb836eabc42f6e57538e3731d", [:mix], [], "hexpm", "bba06bc1dcfd8cb086759f0edc94a8ba2bc8896d5331a1e2c2902bf8e36ee502"},
"phoenix_seo": {:hex, :phoenix_seo, "0.1.9", "afdfc02e891e9e3ff731f0f65e1b2ded197a7fb053ca0de3e5e38e6792323616", [:mix], [{:phoenix_live_view, "~> 0.18", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}], "hexpm", "597189734301fabb06784fcb8d4f96f5e454bd2b48015f4aafd095d4f953a90f"},
"phoenix_template": {:hex, :phoenix_template, "1.0.4", "e2092c132f3b5e5b2d49c96695342eb36d0ed514c5b252a77048d5969330d639", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "2c0c81f0e5c6753faf5cca2f229c9709919aba34fab866d3bc05060c9c444206"},
"phoenix_test": {:git, "https://github.com/germsvel/phoenix_test", "e1df230546d0cd96c03caa6f034b53fceb553abc", []},
"phoenix_test": {:git, "https://github.com/germsvel/phoenix_test", "a8fc877aec9348c1afa4a4c2f8640487bb820487", []},
"phoenix_view": {:hex, :phoenix_view, "2.0.3", "4d32c4817fce933693741deeb99ef1392619f942633dde834a5163124813aad3", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}], "hexpm", "cd34049af41be2c627df99cd4eaa71fc52a328c0c3d8e7d4aa28f880c30e7f64"},
"plug": {:hex, :plug, "1.15.3", "712976f504418f6dff0a3e554c40d705a9bcf89a7ccef92fc6a5ef8f16a30a97", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "cc4365a3c010a56af402e0809208873d113e9c38c401cabd88027ef4f5c01fd2"},
"plug_attack": {:hex, :plug_attack, "0.4.3", "88e6c464d68b1491aa083a0347d59d58ba71a7e591a7f8e1b675e8c7792a0ba8", [:mix], [{:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "9ed6fb8a6f613a36040f2875130a21187126c5625092f24bc851f7f12a8cbdc1"},