mirror of
https://github.com/bonfire-networks/bonfire-app.git
synced 2024-05-05 18:58:44 +00:00
This commit is contained in:
parent
a6f4888a70
commit
5ecf77be1d
|
@ -18,20 +18,20 @@ ENV HOME=/opt/app/ TERM=xterm MIX_ENV=prod FLAVOUR_PATH=./
|
|||
WORKDIR $HOME
|
||||
|
||||
# Prepare elixir deps
|
||||
COPY mix.exs ./
|
||||
COPY lib/mix ./lib/mix
|
||||
COPY --link mix.exs ./
|
||||
COPY --link lib/mix ./lib/mix
|
||||
# sometimes mix tries to read the config
|
||||
RUN mkdir -p ./config
|
||||
COPY data/current_flavour/config/config_basics.exs ./config/config.exs
|
||||
COPY --link data/current_flavour/config/config_basics.exs ./config/config.exs
|
||||
|
||||
RUN mix do local.hex --force, local.rebar --force
|
||||
|
||||
# FIXME: copying mix.lock here means the optimisations of fetching hex and git deps seperately are useless, so commenting those for now
|
||||
COPY mix.lock ./
|
||||
COPY --link mix.lock ./
|
||||
|
||||
# # first get deps from hex.pm
|
||||
# COPY data/current_flavour/config/deps*hex ./config/
|
||||
# COPY --parents flavours/*/config/deps*hex ./
|
||||
# COPY --link data/current_flavour/config/deps*hex ./config/
|
||||
# COPY --parents --link flavours/*/config/deps*hex ./
|
||||
|
||||
# # RUN mix deps.get --only prod
|
||||
# RUN HEX_HTTP_CONCURRENCY=1 HEX_HTTP_TIMEOUT=120 mix deps.get --only prod
|
||||
|
@ -41,14 +41,14 @@ COPY mix.lock ./
|
|||
# RUN if [ "$FORKS_TO_COPY_PATH" = "data/null" ] ; then MIX_ENV=prod mix deps.compile ; else echo "Skip" ; fi
|
||||
|
||||
# # add flavour's git deps (typically Bonfire extensions)
|
||||
# COPY data/current_flavour/config/deps*git ./config/
|
||||
# COPY --parents flavours/*/config/deps*git ./
|
||||
# COPY --link data/current_flavour/config/deps*git ./config/
|
||||
# COPY --parents --link flavours/*/config/deps*git ./
|
||||
|
||||
# # fetch more deps/extensions
|
||||
# RUN mix deps.get --only prod
|
||||
|
||||
# add main dep sources
|
||||
COPY data/current_flavour/config/deps.* ./config/
|
||||
COPY --link data/current_flavour/config/deps.* ./config/
|
||||
RUN ls -la config/*
|
||||
|
||||
RUN mix deps.get --only prod
|
||||
|
@ -57,7 +57,7 @@ RUN mix deps.get --only prod
|
|||
|
||||
## add extra deps
|
||||
# from other flavours
|
||||
COPY --parents flavours/*/config/* ./
|
||||
COPY --parents --link flavours/*/config/* ./
|
||||
# specified by the core app
|
||||
RUN cp -rfL deps/bonfire/deps.* ./config/
|
||||
RUN ls -la config/* && ls flavours/*/config/*
|
||||
|
@ -67,11 +67,11 @@ RUN ls -la config/* && ls flavours/*/config/*
|
|||
# RUN HEX_HTTP_CONCURRENCY=1 HEX_HTTP_TIMEOUT=120 mix deps.get --only prod
|
||||
|
||||
# we need config before compiling Bonfire extensions
|
||||
COPY data/current_flavour/config/ ./config/
|
||||
COPY --link data/current_flavour/config/ ./config/
|
||||
|
||||
# Optionally include local forks
|
||||
RUN if [ "$FORKS_TO_COPY_PATH" = "data/null" ] ; then rm ./config/deps*path && rm ./flavours/*/config/deps*path ; else echo "Include locally forked extensions." ; fi
|
||||
COPY ${FORKS_TO_COPY_PATH} ./${FORKS_TO_COPY_PATH}
|
||||
COPY --link ${FORKS_TO_COPY_PATH} ./${FORKS_TO_COPY_PATH}
|
||||
|
||||
# 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 bonfire.deps.update
|
||||
|
@ -81,26 +81,23 @@ RUN mix deps.get --only prod
|
|||
RUN ls deps/
|
||||
|
||||
# Include translations
|
||||
COPY priv/localisation/ priv/localisation/
|
||||
COPY --link priv/localisation/ priv/localisation/
|
||||
# RUN ls -la priv/localisation/
|
||||
|
||||
# copy these before compiling so we don't override things like flavour_assets/components.css (generated by Surface compiler)
|
||||
COPY data/current_flavour/config/flavour_assets data/current_flavour/config/flavour_assets
|
||||
COPY --link data/current_flavour/config/flavour_assets data/current_flavour/config/flavour_assets
|
||||
RUN ls -la data/current_flavour/config/flavour_assets
|
||||
|
||||
# docs/guides
|
||||
COPY docs/*.md ./docs/
|
||||
|
||||
# Compile remaining deps
|
||||
# RUN MIX_ENV=prod mix deps.compile # disabled because doesn't properly compile Surface hooks/CSS
|
||||
|
||||
# JS package manager
|
||||
# RUN npm install -g pnpm
|
||||
# install JS deps
|
||||
COPY js-deps-get.sh ./
|
||||
# COPY assets/package.json ./assets/
|
||||
# COPY assets/pnpm-lock.yaml ./assets/
|
||||
# COPY assets/yarn.lock ./assets/
|
||||
COPY --link js-deps-get.sh ./
|
||||
# COPY --link assets/package.json ./assets/
|
||||
# COPY --link assets/pnpm-lock.yaml ./assets/
|
||||
# COPY --link assets/yarn.lock ./assets/
|
||||
RUN chmod +x config/*.sh
|
||||
RUN chmod +x ./*.sh
|
||||
RUN sh config/deps.js.sh
|
||||
|
@ -109,10 +106,9 @@ RUN sh config/deps.js.sh
|
|||
# Update mime types
|
||||
RUN MIX_ENV=prod mix deps.clean --build mime
|
||||
|
||||
|
||||
# bonfire-app code & assets
|
||||
COPY lib lib
|
||||
# COPY assets assets
|
||||
COPY --link lib lib
|
||||
# COPY --link assets assets
|
||||
# RUN ls -la assets/static
|
||||
|
||||
# workaround for compilation errors
|
||||
|
@ -124,22 +120,26 @@ RUN MIX_ENV=prod mix deps.clean needle_ulid jason poison --build
|
|||
RUN MIX_ENV=prod mix compile
|
||||
|
||||
# Include any migrations provided by flavour (maybe not needed?)
|
||||
# COPY data/current_flavour/repo priv/repo
|
||||
# COPY --link data/current_flavour/repo priv/repo
|
||||
RUN mkdir -p priv/repo/migrations
|
||||
|
||||
# Copy DB/repo migrations from installed extensions
|
||||
RUN mix bonfire.extension.copy_migrations --force --to priv/repo/migrations
|
||||
|
||||
# docs/guides
|
||||
COPY --link LICENSE ./
|
||||
COPY --link ./*.md ./
|
||||
COPY --link docs/*.md ./docs/
|
||||
|
||||
# include an archive of the source code
|
||||
COPY LICENSE ./
|
||||
RUN mkdir -p apps/
|
||||
RUN mkdir -p extensions/
|
||||
RUN mkdir -p forks/
|
||||
RUN mkdir -p priv/static/
|
||||
# COPY priv/extras/ priv/extras/
|
||||
# COPY --link priv/extras/ priv/extras/
|
||||
|
||||
# prepare static assets
|
||||
COPY data/current_flavour/config/deps_hooks.js data/current_flavour/config/deps_hooks.js
|
||||
COPY --link data/current_flavour/config/deps_hooks.js data/current_flavour/config/deps_hooks.js
|
||||
RUN cd ./deps/bonfire_ui_common/assets && yarn && yarn build
|
||||
RUN MIX_ENV=prod CI=1 mix phx.digest
|
||||
RUN ls -la priv/static
|
||||
|
|
|
@ -40,7 +40,8 @@ More details at https://bonfirenetworks.org",
|
|||
show_activity_counts: false,
|
||||
show_profile_background_image: true,
|
||||
# should be enabled if using any extra extensions (other than social) or if you used some in the past and still want to display the old activities
|
||||
feed_object_extension_preloads_disabled: true,
|
||||
# TODO: check if / how much this slows down the app
|
||||
feed_object_extension_preloads_disabled: false,
|
||||
# end theme
|
||||
hide_app_switcher: true,
|
||||
rich_text_editor_disabled: false,
|
||||
|
|
Loading…
Reference in a new issue