up (with docker release fix)

This commit is contained in:
Mayel de Borniol 2022-05-06 15:48:49 +12:00
parent e5385ead15
commit 65b7e2588b
7 changed files with 38 additions and 35 deletions

View file

@ -11,7 +11,7 @@ jobs:
test_classic_flavour:
name: Test classic flavour
runs-on: ubuntu-latest
container: elixir:alpine
container: elixir:1.13-alpine
env:
FLAVOUR: classic
MIX_ENV: test
@ -94,7 +94,7 @@ jobs:
test_cooperation_flavour:
name: Test cooperation flavour
runs-on: ubuntu-latest
container: elixir:alpine
container: elixir:1.13-alpine
env:
FLAVOUR: cooperation
MIX_ENV: test

View file

@ -1,2 +1,2 @@
erlang 24.3.3
elixir 1.13.3-otp-24
erlang 24.3.4
elixir 1.13.4-otp-24

View file

@ -1,16 +1,20 @@
# The version of Elixir to use
# ATTENTION: when changing Elixir version, make sure to update the `ALPINE_VERSION` arg
# as well as the Elixir version in mix.exs and .gitlab-ci.yml and Dockerfile.dev and .tool-versions
ARG ELIXIR_VERSION=1.12
# 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_VERSION=1.13
# 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 to get the erlang image version
# e.g. https://github.com/erlef/docker-elixir/blob/master/1.12/Dockerfile
# 1. Locate the dockerfile for the elixir image to check what erlang version is used
# e.g. https://github.com/erlef/docker-elixir/blob/master/1.13/Dockerfile
# 2. Locate the corresponding dockerfile for the erlang versio used and copy the alpine version indicated there below:
# e.g. https://github.com/erlang/docker-erlang-otp/blob/master/24/alpine/Dockerfile
ARG ALPINE_VERSION=3.14
ARG ALPINE_VERSION=3.15
# 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)
@ -43,29 +47,33 @@ COPY data/current_flavour/config/deps.hex ./config/
RUN mix do local.hex --force, local.rebar --force
RUN mix do deps.get --only prod
# Compile initial hex deps
RUN MIX_ENV=prod mix do deps.compile
# Compile elixir deps (warning this makes the assumption that no Bonfire extensions are coming from Hex. otherwise this should be done only after copying config)
# RUN MIX_ENV=prod mix do deps.compile
# git deps (i.e. Bonfire extensions)
# add git deps (typically Bonfire extensions)
COPY data/current_flavour/config/deps.git ./config/
RUN mix do deps.get --only prod
# we need config before compiling Bonfire extensions
COPY data/current_flavour/config/* ./config/
RUN rm ./config/deps.path
# Comment the line above and uncomment the ones below only if you want to include locally-forked deps in the release
# RUN ls -la ./config
# RUN MIX_ENV=prod mix do deps.compile
RUN rm ./config/deps.path
# Comment the line above and uncomment the one below only if you want to include locally-forked deps in the release (rather than only ones downloaded from hex.pm or git)
# COPY forks ./
# Update Bonfire extensions to latest git version
RUN mix do bonfire.deps.update
# Update Bonfire extensions to latest git version (mostly useful in CI, and temporary: eventually we want to rely on version numbers and lockfile)
# RUN mix do bonfire.deps.update
# Uncomment these lines only if you want to include locally-forked deps in the release (rather than only ones downloaded from hex.pm or git)
# COPY data/current_flavour/config/deps.path ./config
# COPY forks/ ./
# In case an updated or forked extension specified any different deps
# RUN mix do deps.get --only prod
# Compile remaining deps
RUN MIX_ENV=prod mix do deps.compile
# JS package manager
RUN npm install -g pnpm
# install JS deps
@ -74,9 +82,6 @@ COPY priv/*.sh ./priv/
RUN chmod +x assets/*.sh && sh assets/install.sh
RUN chmod +x config/*.sh && chmod +x priv/*.sh && sh config/deps.js.sh
# Compile Bonfire extensions
RUN MIX_ENV=prod mix do deps.compile
# Update mime types
RUN MIX_ENV=prod mix do deps.clean --build mime
@ -88,9 +93,6 @@ COPY lib lib
COPY assets assets
# COPY . .
# In case some dep lockfile has a different version
RUN mix do deps.get --only prod
# include an archive of the source code
COPY LICENSE ./
RUN mkdir -p priv/static/ && tar --exclude=*.env --exclude=assets/node_modules --exclude=assets/static/data -czvf priv/static/source.tar.gz lib deps assets config priv/repo mix.exs mix.lock mess.exs LICENSE

View file

@ -358,7 +358,7 @@ rel.env:
rel.config.prepare: rel.env # copy current flavour's config, without using symlinks
rm -rf ./data/current_flavour
mkdir data
mkdir -p data
@cp -rfL $(FLAVOUR_PATH) ./data/current_flavour
rel.prepare: rel.env rel.config.prepare # copy current flavour's config, without using symlinks

View file

@ -46,3 +46,4 @@ bonfire_invite_links= "https://github.com/bonfire-networks/bonfire_invite_links#
where = "https://github.com/bonfire-networks/where#main"
# bonfire_data_assort = "https://github.com/bonfire-networks/bonfire_data_assort#master"
bonfire_editor_ck = "https://github.com/bonfire-networks/bonfire_editor_ck#main"

View file

@ -3,8 +3,8 @@ defmodule Bonfire.MixProject do
use Mix.Project
@config [ # TODO: put these in ENV or an external writeable config file similar to deps.*
version: "0.2.0-alpha.69", # note that the flavour will automatically be added where the dash appears
elixir: "~> 1.12",
version: "0.2.0-alpha.70", # note that the flavour will automatically be added where the dash appears
elixir: "~> 1.13",
default_flavour: "classic",
logo: "assets/static/images/bonfire-icon.png",
docs: [

View file

@ -16,7 +16,7 @@
"bonfire_boundaries": {:git, "https://github.com/bonfire-networks/bonfire_boundaries", "e401fbae3d7d3fc9cb85eba4bebe458369f4f14c", [branch: "main"]},
"bonfire_breadpub": {:git, "https://github.com/bonfire-networks/bonfire_breadpub", "6317fc87fa24e17920f172596c28e2a686ce7456", [branch: "main"]},
"bonfire_classify": {:git, "https://github.com/bonfire-networks/bonfire_classify", "2206a822df6f312ee4a34f6ce5625c592f78aac1", [branch: "main"]},
"bonfire_common": {:git, "https://github.com/bonfire-networks/bonfire_common", "271adbec267908a2648b6250a2d8308ef8ddc7a5", [branch: "main"]},
"bonfire_common": {:git, "https://github.com/bonfire-networks/bonfire_common", "2bd7b746735b3cd4201fe6fa7d86cb3cfc8a5019", [branch: "main"]},
"bonfire_data_access_control": {:git, "https://github.com/bonfire-networks/bonfire_data_access_control", "371c12e51db03dde11219b37ae2b768f6fd8aa2e", [branch: "main"]},
"bonfire_data_activity_pub": {:git, "https://github.com/bonfire-networks/bonfire_data_activity_pub", "5522116c8e5b1a6264fe87139c0a0345aa715cd9", [branch: "main"]},
"bonfire_data_assort": {:git, "https://github.com/bonfire-networks/bonfire_data_assort", "71b845d0e6b5013c5a7081c35edbc7ddd383af65", [branch: "master"]},
@ -38,14 +38,14 @@
"bonfire_open_id": {:git, "https://github.com/bonfire-networks/bonfire_open_id", "16e86b55188b7cd06f1c96f7c358fc7302e31430", [branch: "main"]},
"bonfire_quantify": {:git, "https://github.com/bonfire-networks/bonfire_quantify", "d4c656c738d6ebb8859d804c8f3cb537aebdc49d", [branch: "main"]},
"bonfire_search": {:git, "https://github.com/bonfire-networks/bonfire_search", "98f185573056eadcc611602e948f0ab124b121c5", [branch: "main"]},
"bonfire_social": {:git, "https://github.com/bonfire-networks/bonfire_social", "4aa14b917d8a44752b111e4c153c8cc3b096022d", [branch: "main"]},
"bonfire_social": {:git, "https://github.com/bonfire-networks/bonfire_social", "c7189632af40e6f44e3c2bfc7b83d53895b82030", [branch: "main"]},
"bonfire_tag": {:git, "https://github.com/bonfire-networks/bonfire_tag", "00def4119bf7d6af8820ad61faba0dc6c4bb36fd", [branch: "main"]},
"bonfire_ui_common": {:git, "https://github.com/bonfire-networks/bonfire_ui_common", "b02fedcee5eb38ffc284d54aa8f1f2cd4fd8e979", [branch: "main"]},
"bonfire_ui_common": {:git, "https://github.com/bonfire-networks/bonfire_ui_common", "18d66f9f1b347351c2aeae5796a0afd882ae3b8b", [branch: "main"]},
"bonfire_ui_coordination": {:git, "https://github.com/bonfire-networks/bonfire_ui_coordination", "945bfb01adf9ce588a9d7b62efab9978c3ebf62b", [branch: "main"]},
"bonfire_ui_kanban": {:git, "https://github.com/bonfire-networks/bonfire_ui_kanban", "a89e9fb3c55593c6930a353512d653f9308654a6", [branch: "main"]},
"bonfire_ui_reflow": {:git, "https://github.com/bonfire-networks/bonfire_ui_reflow", "44ce7fe42a7e29e585034034d5c63e1997bb652a", [branch: "main"]},
"bonfire_ui_social": {:git, "https://github.com/bonfire-networks/bonfire_ui_social", "85574d977a567f26d8a9be65a9b7272b4d064594", [branch: "main"]},
"bonfire_ui_valueflows": {:git, "https://github.com/bonfire-networks/bonfire_ui_valueflows", "3c8fd7c891b93d1bd797454e5c72f333c861141d", [branch: "main"]},
"bonfire_ui_social": {:git, "https://github.com/bonfire-networks/bonfire_ui_social", "eeffd29911f27ced8357495f62291abf05e3a0d4", [branch: "main"]},
"bonfire_ui_valueflows": {:git, "https://github.com/bonfire-networks/bonfire_ui_valueflows", "7794a6500068aaafe576ae0b29a57d8a48ea5bc1", [branch: "main"]},
"bonfire_upcycle": {:git, "https://gitlab.com/bonfire-networks/bonfire_upcycle", "bb3fb7f2ad8664290913cf0d76f877b7aac2f269", [branch: "master"]},
"bonfire_valueflows": {:git, "https://github.com/bonfire-networks/bonfire_valueflows", "83d9148c94f876e946f6deba1fc67cfbbda6fd72", [branch: "main"]},
"bonfire_valueflows_observe": {:git, "https://github.com/bonfire-networks/bonfire_valueflows_observe", "b86eac238a4b9824ca94ea87dbbe8e9b41bef6dd", [branch: "main"]},