mirror of
https://github.com/bonfire-networks/bonfire-app.git
synced 2024-05-17 08:32:41 +00:00
various
This commit is contained in:
parent
37fa9e3084
commit
eb7b92fe3b
|
@ -1,5 +1,5 @@
|
|||
[
|
||||
import_deps: [:ecto, :phoenix, :ecto_sql, :surface],
|
||||
inputs: ["*.{ex,exs}", "priv/*/seeds.exs", "{config,lib,test}/**/*.{ex,exs}"],
|
||||
inputs: ["*.{ex,exs,sface}", "priv/*/seeds.exs", "{config,lib,test}/**/*.{ex,exs,sface}", "forks/*/{config,lib,test}/**/*.{ex,exs,sface}"],
|
||||
subdirectories: ["priv/*/migrations"]
|
||||
]
|
||||
|
|
|
@ -61,6 +61,7 @@ config :bonfire, :encryption_salt, encryption_salt
|
|||
config :bonfire,
|
||||
otp_app: :bonfire,
|
||||
env: config_env(),
|
||||
app_name: System.get_env("APP_NAME", "Bonfire"),
|
||||
repo_module: Bonfire.Repo,
|
||||
web_module: Bonfire.Web,
|
||||
endpoint_module: Bonfire.Web.Endpoint,
|
||||
|
@ -81,7 +82,7 @@ config :bonfire, Bonfire.Web.Endpoint,
|
|||
|
||||
config :phoenix, :json_library, Jason
|
||||
|
||||
# config :bonfire, Bonfire.Repo, types: Bonfire.PostgresTypes
|
||||
config :bonfire, Bonfire.Repo, types: Bonfire.PostgresTypes
|
||||
|
||||
config :bonfire,
|
||||
ecto_repos: [Bonfire.Repo]
|
||||
|
|
|
@ -20,7 +20,7 @@ config :logger, level: :warn
|
|||
# Run `mix help test` for more information.
|
||||
config :bonfire, Bonfire.Repo,
|
||||
pool: Ecto.Adapters.SQL.Sandbox,
|
||||
pool_size: 60,
|
||||
pool_size: 96,
|
||||
username: System.get_env("POSTGRES_USER", "postgres"),
|
||||
password: System.get_env("POSTGRES_PASSWORD", "postgres"),
|
||||
database: "bonfire_test#{System.get_env("MIX_TEST_PARTITION")}",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# # required by Bonfire.Geolocate
|
||||
# Postgrex.Types.define(
|
||||
# Bonfire.PostgresTypes,
|
||||
# [Geo.PostGIS.Extension] ++ Ecto.Adapters.Postgres.extensions(),
|
||||
# json: Jason
|
||||
# )
|
||||
# required by Bonfire.Geolocate
|
||||
Postgrex.Types.define(
|
||||
Bonfire.PostgresTypes,
|
||||
[Geo.PostGIS.Extension] ++ Ecto.Adapters.Postgres.extensions(),
|
||||
json: Jason
|
||||
)
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
<div class="lg:flex space-x-4 w-full">
|
||||
<div class="lg:w-1/2 md:w-2/3 w-full mx-auto text-left">
|
||||
<div class="mb-3">
|
||||
<h2 class="mt-20 text-3xl font-extrabold text-gray-900 sm:text-4xl">Bonfire</h2>
|
||||
<h2 class="mt-20 text-3xl font-extrabold text-gray-900 sm:text-4xl"><%= Bonfire.Application.name() || "Bonfire" %></h2>
|
||||
<p class="mt-3 text-lg text-gray-500">
|
||||
This is a staging bonfire instance for testing and development purposes.
|
||||
This is a temporary Bonfire instance for testing and development purposes.
|
||||
</p>
|
||||
|
||||
<div class="my-6 flex items-center space-x-4">
|
||||
|
@ -36,6 +36,8 @@
|
|||
|
||||
</div>
|
||||
|
||||
<p><%= Bonfire.Application.named_version() %></p>
|
||||
|
||||
<%# <div class="mt-4 text-semibold text-sm mb-2 text-gray-700">Administrated by</div>
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<div class="relative rounded-lg bg-white p-3 border shadow-sm flex items-center space-x-3 hover:border-gray-400 focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-indigo-500">
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
defmodule Bonfire.Web.Router do
|
||||
use Bonfire.Web, :router
|
||||
alias Bonfire.Common.Utils
|
||||
require Utils
|
||||
|
||||
pipeline :browser do
|
||||
plug :accepts, ["html"]
|
||||
|
@ -33,27 +31,27 @@ defmodule Bonfire.Web.Router do
|
|||
|
||||
# include routes for active Bonfire extensions (no need to comment out, they'll be skipped if not available or if disabled)
|
||||
|
||||
# Utils.use_if_enabled Bonfire.Website.Web.Routes
|
||||
# use_if_enabled Bonfire.Website.Web.Routes
|
||||
|
||||
Utils.use_if_enabled Bonfire.UI.Reflow.Routes
|
||||
Utils.use_if_enabled Bonfire.UI.Coordination.Routes
|
||||
Utils.use_if_enabled Bonfire.Breadpub.Routes
|
||||
Utils.use_if_enabled Bonfire.Recyclapp.Routes
|
||||
use_if_enabled Bonfire.UI.Reflow.Routes
|
||||
use_if_enabled Bonfire.UI.Coordination.Routes
|
||||
use_if_enabled Bonfire.Breadpub.Routes
|
||||
use_if_enabled Bonfire.Recyclapp.Routes
|
||||
|
||||
Utils.use_if_enabled Bonfire.Me.Web.Routes
|
||||
Utils.use_if_enabled Bonfire.Social.Web.Routes
|
||||
use_if_enabled Bonfire.Me.Web.Routes
|
||||
use_if_enabled Bonfire.Social.Web.Routes
|
||||
|
||||
Utils.use_if_enabled Bonfire.Search.Web.Routes
|
||||
Utils.use_if_enabled Bonfire.Classify.Web.Routes
|
||||
use_if_enabled Bonfire.Search.Web.Routes
|
||||
use_if_enabled Bonfire.Classify.Web.Routes
|
||||
|
||||
# include GraphQL API
|
||||
Utils.use_if_enabled Bonfire.GraphQL.Router
|
||||
use_if_enabled Bonfire.GraphQL.Router
|
||||
|
||||
# include federation routes
|
||||
Utils.use_if_enabled ActivityPubWeb.Router
|
||||
use_if_enabled ActivityPubWeb.Router
|
||||
|
||||
# include nodeinfo routes
|
||||
Utils.use_if_enabled NodeinfoWeb.Router
|
||||
use_if_enabled NodeinfoWeb.Router
|
||||
|
||||
|
||||
## Below you can define routes specific to your flavour of Bonfire (which aren't handled by extensions)
|
||||
|
@ -102,17 +100,17 @@ defmodule Bonfire.Web.Router do
|
|||
scope "/" do
|
||||
pipe_through :browser
|
||||
|
||||
if Utils.module_enabled?(Phoenix.LiveDashboard.Router) do
|
||||
if module_enabled?(Phoenix.LiveDashboard.Router) do
|
||||
import Phoenix.LiveDashboard.Router
|
||||
live_dashboard "/settings/admin/dashboard", metrics: Bonfire.Web.Telemetry
|
||||
end
|
||||
|
||||
if Utils.module_enabled?(Bamboo.SentEmailViewerPlug) do
|
||||
if module_enabled?(Bamboo.SentEmailViewerPlug) do
|
||||
forward "/emails", Bamboo.SentEmailViewerPlug
|
||||
end
|
||||
|
||||
if Utils.module_enabled?(Surface.Catalogue.Router) do
|
||||
Utils.import_if_enabled Surface.Catalogue.Router
|
||||
if module_enabled?(Surface.Catalogue.Router) do
|
||||
import_if_enabled Surface.Catalogue.Router
|
||||
Surface.Catalogue.Router.surface_catalogue "/catalogue"
|
||||
end
|
||||
end
|
||||
|
|
8
mix.exs
8
mix.exs
|
@ -8,7 +8,7 @@ defmodule Bonfire.MixProject do
|
|||
app: :bonfire,
|
||||
version: "0.1.0-alpha.73",
|
||||
elixir: "~> 1.11",
|
||||
elixirc_paths: elixirc_paths(Mix.env()),
|
||||
elixirc_paths: elixirc_paths(Mix.env()) |> IO.inspect,
|
||||
test_paths: test_paths(),
|
||||
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
|
||||
start_permanent: Mix.env() == :prod,
|
||||
|
@ -103,13 +103,15 @@ defmodule Bonfire.MixProject do
|
|||
defp dep_path(dep) do
|
||||
spec = elem(dep, 1)
|
||||
if is_list(spec) && spec[:path],
|
||||
do: Path.expand(spec[:path]),
|
||||
do: spec[:path],
|
||||
else: Mix.Project.deps_path() <> "/" <> dep_name(dep)
|
||||
end
|
||||
|
||||
defp dep_paths(dep, extra) when is_list(extra), do: Enum.flat_map(extra, &dep_paths(dep, &1))
|
||||
defp dep_paths(dep, extra) when is_binary(extra) do
|
||||
path = Path.join(dep_path(dep), extra)
|
||||
# IO.inspect(path)
|
||||
# IO.inspect(File.ls(path))
|
||||
if File.exists?(path), do: [path], else: []
|
||||
end
|
||||
|
||||
|
@ -118,7 +120,7 @@ defmodule Bonfire.MixProject do
|
|||
|
||||
@test_deps [:pointers]
|
||||
|
||||
defp dep?(:test, dep), do: elem(dep, 0) in @test_deps || String.starts_with?(dep_name(dep), "bonfire_")
|
||||
defp dep?(:test, dep), do: elem(dep, 0) in @test_deps || String.starts_with?(dep_name(dep), "bonfire_")
|
||||
|
||||
defp dep_name(dep), do: Atom.to_string(elem(dep, 0))
|
||||
|
||||
|
|
Loading…
Reference in a new issue