aprs.me/config/dev.exs
Graham McIntire 2e101870d7
Some checks failed
Elixir CI / Build and test (push) Failing after 3m49s
Elixir CI / Dialyzer (push) Successful in 6m45s
Elixir CI / Build and Push Docker Image (push) Has been skipped
fix: compile-time config validation and egress policy
- Remove url/live_view from config/config.exs (prevents dev config from baking into releases)
- Move url/live_view to config/dev.exs and config/test.exs
- Add validate_compile_env: false to release config in mix.exs
- Fix egress network policy to allow DB at 10.0.19.30:6432 (PgBouncer)
- Add RELEASE_VALIDATE_COMPILE_ENV to init container env
2026-08-06 17:20:34 -05:00

110 lines
3.5 KiB
Elixir

import Config
# Configure your database
config :aprsme, Aprsme.Repo,
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with esbuild to bundle .js and .css sources.
username: "postgres",
password: "postgres",
hostname: "localhost",
database: "aprsme_dev",
stacktrace: true,
show_sensitive_data_on_connection_error: true,
# Optimized pool settings for development (increased from 15)
pool_size: 30,
pool_timeout: 10_000,
timeout: 30_000,
queue_target: 100,
queue_interval: 1_000,
# log: :debug,
log: false,
types: Aprsme.PostgresTypes,
# Use unnamed prepared statements for better development flexibility
prepare: :unnamed,
# Socket options for better performance
socket_options: [
keepalive: true,
nodelay: true
],
# Development-specific parameters matching PostgreSQL config
parameters: [
application_name: "aprsme_dev",
work_mem: "16MB",
statement_timeout: "60s"
]
config :aprsme, AprsmeWeb.Endpoint,
# Binding to loopback ipv4 address prevents access from other machines.
# Change to `ip: {0, 0, 0, 0}` to allow access from other machines.
adapter: Bandit.PhoenixAdapter,
url: [host: "localhost"],
http: [ip: {127, 0, 0, 1}, port: 4000],
live_view: [signing_salt: "dev-signing-salt-local-only"],
check_origin: false,
code_reloader: true,
debug_errors: true,
secret_key_base: "Vv8Uh9w7tSoac1wBo7A8MyTSE9J+RzNeAzPTGcsW2InUBHpPBgt1dACJrIZorfdH",
watchers: [
esbuild:
{Esbuild, :install_and_run,
[
:default,
~w(--sourcemap=inline --watch --loader:.ts=ts)
]},
tailwind: {Tailwind, :install_and_run, [:default, ~w(--watch)]}
]
# Watch static and templates for browser reloading.
config :aprsme, AprsmeWeb.Endpoint,
live_reload: [
web_console_logger: true,
patterns: [
~r"priv/static/(?!uploads/).*(js|css|png|jpeg|jpg|gif|svg)$"E,
~r"priv/gettext/.*(po)$"E,
~r"lib/aprsme_web/(?:controllers|live|components|router)/?.*\.(ex|heex)$"E
]
]
# Enable dev routes for dashboard and mailbox
#
# Run `mix help phx.gen.cert` for more information.
config :aprsme, dev_routes: true
# Mailer configuration for development
# Using Swoosh.Adapters.Local from config.exs which stores emails locally
# Access sent emails at http://localhost:4000/dev/mailbox
# Configure Hammer for development environment
config :hammer,
backend: {Hammer.Backend.ETS, [expiry_ms: 60_000 * 60 * 4, cleanup_interval_ms: 60_000 * 10]}
# Do not include metadata nor timestamps in development logs
#
# The `http:` config above can be replaced with:
#
# https: [
config :logger, :console, format: "[$level] $metadata$message\n", metadata: [:remote_ip, :user_agent]
# Initialize plugs at runtime for faster development compilation
# port: 4001,
# cipher_suite: :strong,
# keyfile: "priv/cert/selfsigned_key.pem",
config :phoenix, :plug_init_mode, :runtime
# Set a higher stacktrace during development. Avoid configuring such
# certfile: "priv/cert/selfsigned.pem"
# Disable swoosh api client as it is only required for production adapters.
# in production as building large stacktraces may be expensive.
# different ports.
# ],
#
# If desired, both `http:` and `https:` keys can be
# configured to run both http and https servers on
config :phoenix, :stacktrace_depth, 20
config :swoosh, :api_client, false