mirror of
https://github.com/bonfire-networks/bonfire-app.git
synced 2024-05-14 15:12:40 +00:00
This commit is contained in:
parent
6e6646e89d
commit
b66934c138
|
@ -6,5 +6,5 @@ elixir 1.16.0-otp-26
|
|||
# elixir 1.13.4-otp-25
|
||||
just 1.23
|
||||
yarn 1.22.19
|
||||
nodejs 21.6.0
|
||||
nodejs 21.6.1
|
||||
chromedriver latest
|
||||
|
|
|
@ -42,17 +42,25 @@ local_deps =
|
|||
# else: []
|
||||
|
||||
use_cowboy? = System.get_env("PLUG_SERVER") == "cowboy"
|
||||
max_requests = 1
|
||||
|
||||
# Watch static and templates for browser reloading.
|
||||
config :bonfire, Bonfire.Web.Endpoint,
|
||||
server: true,
|
||||
debug_errors: false,
|
||||
check_origin: false,
|
||||
http: if(use_cowboy?, do: [protocol_options: [idle_timeout: 120_000]], else: [])
|
||||
http:
|
||||
if(use_cowboy?,
|
||||
do: [protocol_options: [idle_timeout: 120_000]],
|
||||
else: [
|
||||
http_1_options: [max_requests: max_requests],
|
||||
http_1_options: [max_requests: max_requests]
|
||||
]
|
||||
)
|
||||
|
||||
enable_code_reloading = System.get_env("HOT_CODE_RELOAD") != "0"
|
||||
if System.get_env("HOT_CODE_RELOAD") != "-1" do
|
||||
config :bonfire, :hot_code_reload, System.get_env("HOT_CODE_RELOAD") != "0"
|
||||
|
||||
if enable_code_reloading do
|
||||
local_dep_names = Enum.map(local_deps, &elem(&1, 0))
|
||||
|
||||
dep_paths =
|
||||
|
@ -116,6 +124,8 @@ if enable_code_reloading do
|
|||
]
|
||||
end
|
||||
|
||||
# code reloading
|
||||
|
||||
config :bonfire, Bonfire.Web.Endpoint, phoenix_profiler: [server: Bonfire.Web.Profiler]
|
||||
|
||||
config :surface,
|
||||
|
|
|
@ -106,9 +106,10 @@ config :bonfire, Bonfire.Web.Endpoint,
|
|||
do: [
|
||||
port: server_port,
|
||||
# only bind the app to localhost when serving behind a proxy
|
||||
http: if(public_port != server_port, do: [ip: {127, 0, 0, 1}]),
|
||||
# ip: (if public_port != server_port, do: {127, 0, 0, 1}),
|
||||
transport_options: [max_connections: 16_384, socket_opts: [:inet6]]
|
||||
],
|
||||
# bandit
|
||||
else: [
|
||||
port: server_port
|
||||
]
|
||||
|
|
18
justfile
18
justfile
|
@ -115,6 +115,7 @@ config:
|
|||
rm -rf ./data/current_flavour
|
||||
ln -sf ../$FLAVOUR_PATH ./data/current_flavour
|
||||
mkdir -p priv/static/public
|
||||
# ulimit -n 524288
|
||||
echo "Using $MIX_ENV env, with flavour: $FLAVOUR at path: $FLAVOUR_PATH"
|
||||
|
||||
init services="db": pre-init
|
||||
|
@ -177,7 +178,7 @@ dev-profile-iex profile:
|
|||
docker compose --profile $profile exec web iex --sname extra --remsh localenv
|
||||
|
||||
dev-federate:
|
||||
FEDERATE=yes HOSTNAME=$(just local-tunnel-hostname) PUBLIC_PORT=443 just dev
|
||||
FEDERATE=yes HOT_CODE_RELOAD=-1 HOSTNAME=$(just local-tunnel-hostname) PUBLIC_PORT=443 just dev
|
||||
|
||||
dev-docker *args='': docker-stop-web
|
||||
docker compose $args run --name $WEB_CONTAINER --service-ports web
|
||||
|
@ -855,11 +856,18 @@ sys-deps-debian:
|
|||
# to test federation locally you can use `just dev-federate` or `just test-federation-live-DRAGONS`
|
||||
# and run this in seperate terminal to start the above tunnel: `just tunnel-start`
|
||||
# this requires `cargo install tunnelto` (the homebrew version of tunnelto doesn't work)
|
||||
@tunnel-start:
|
||||
@tunnel-start-tunnelto:
|
||||
echo "Opening tunnel on ${TUNNEL_SUBDOMAIN}.tunnelto.dev"
|
||||
tunnelto --subdomain $TUNNEL_SUBDOMAIN --port 4000
|
||||
|
||||
@local-tunnel-hostname:
|
||||
echo "${TUNNEL_SUBDOMAIN}.tunnelto.dev"
|
||||
# alternatively FIXME in case tunnel.pyjam.as comes back up:
|
||||
# command -v wg-quick &> /dev/null || exit "You need to install Wireguard to run the tunnel/proxy. E.g. with: brew install wireguard-tools"
|
||||
# ([ -f tunnel.conf ] || curl https://tunnel.pyjam.as/{{PUBLIC_PORT}} > tunnel.conf) && (wg-quick up ./tunnel.conf || cat tunnel.conf) | pcregrep -o1 'https:\/\/([^/]+)'
|
||||
# just tunnel-pyjamas
|
||||
|
||||
@tunnel-pyjamas:
|
||||
command -v wg-quick &> /dev/null || exit "You need to install Wireguard to run the tunnel/proxy. E.g. with: brew install wireguard-tools"
|
||||
([ -f tunnel.conf ] || curl https://tunnel.pyjam.as/{{PUBLIC_PORT}} > tunnel.conf) && (wg-quick up ./tunnel.conf || cat tunnel.conf) | pcregrep -o1 'https:\/\/([^/]+)'
|
||||
|
||||
@tunnel-pyjamas-down:
|
||||
wg-quick down ./tunnel.conf
|
||||
|
||||
|
|
Loading…
Reference in a new issue