restart without ecto
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
import Config
|
||||
|
||||
config :cobblemon_ui,
|
||||
ecto_repos: [CobblemonUi.Repo],
|
||||
generators: [timestamp_type: :utc_datetime]
|
||||
|
||||
# Configure the endpoint
|
||||
@@ -20,16 +19,8 @@ config :cobblemon_ui, CobblemonUiWeb.Endpoint,
|
||||
layout: false
|
||||
],
|
||||
pubsub_server: CobblemonUi.PubSub,
|
||||
live_view: [signing_salt: "GoTvr0Cl"]
|
||||
live_view: [signing_salt: "X61XE3GM"]
|
||||
|
||||
# Configure the mailer
|
||||
#
|
||||
# By default it uses the "Local" adapter which stores the emails
|
||||
# locally. You can see the emails in your browser, at "/dev/mailbox".
|
||||
#
|
||||
# For production it's recommended to configure a different adapter
|
||||
# at the `config/runtime.exs`.
|
||||
config :cobblemon_ui, CobblemonUi.Mailer, adapter: Swoosh.Adapters.Local
|
||||
|
||||
# Configure esbuild (the version is required)
|
||||
config :esbuild,
|
||||
|
||||
@@ -1,15 +1,5 @@
|
||||
import Config
|
||||
|
||||
# Configure your database
|
||||
config :cobblemon_ui, CobblemonUi.Repo,
|
||||
username: "postgres",
|
||||
password: "postgres",
|
||||
hostname: "localhost",
|
||||
database: "cobblemon_ui_dev",
|
||||
stacktrace: true,
|
||||
show_sensitive_data_on_connection_error: true,
|
||||
pool_size: 10
|
||||
|
||||
# For development, we disable any cache and enable
|
||||
# debugging and code reloading.
|
||||
#
|
||||
@@ -23,7 +13,7 @@ config :cobblemon_ui, CobblemonUiWeb.Endpoint,
|
||||
check_origin: false,
|
||||
code_reloader: true,
|
||||
debug_errors: true,
|
||||
secret_key_base: "Ri7PsfpT7Pi2WbEgad11Gwsw97YY/K4CfI7d+2jNVOcjPJHV9gWp9SzPM7qc046I",
|
||||
secret_key_base: "TdD8LGB6e2clyN5NTh63SGVw+szHUzFXPSAWh77XTvdzRvRFX+a2DCBkrL+DJ2oN",
|
||||
watchers: [
|
||||
esbuild: {Esbuild, :install_and_run, [:cobblemon_ui, ~w(--sourcemap=inline --watch)]},
|
||||
tailwind: {Tailwind, :install_and_run, [:cobblemon_ui, ~w(--watch)]}
|
||||
@@ -87,6 +77,3 @@ config :phoenix_live_view,
|
||||
debug_attributes: true,
|
||||
# Enable helpful, but potentially expensive runtime checks
|
||||
enable_expensive_runtime_checks: true
|
||||
|
||||
# Disable swoosh api client as it is only required for production adapters.
|
||||
config :swoosh, :api_client, false
|
||||
|
||||
@@ -12,18 +12,14 @@ config :cobblemon_ui, CobblemonUiWeb.Endpoint,
|
||||
# known as HSTS. If you have a health check endpoint, you may want to exclude it below.
|
||||
# Note `:force_ssl` is required to be set at compile-time.
|
||||
config :cobblemon_ui, CobblemonUiWeb.Endpoint,
|
||||
force_ssl: [rewrite_on: [:x_forwarded_proto]],
|
||||
exclude: [
|
||||
# paths: ["/health"],
|
||||
hosts: ["localhost", "127.0.0.1"]
|
||||
force_ssl: [
|
||||
rewrite_on: [:x_forwarded_proto],
|
||||
exclude: [
|
||||
# paths: ["/health"],
|
||||
hosts: ["localhost", "127.0.0.1"]
|
||||
]
|
||||
]
|
||||
|
||||
# Configure Swoosh API Client
|
||||
config :swoosh, api_client: Swoosh.ApiClient.Req
|
||||
|
||||
# Disable Swoosh Local Memory Storage
|
||||
config :swoosh, local: false
|
||||
|
||||
# Do not print debug messages in production
|
||||
config :logger, level: :info
|
||||
|
||||
|
||||
@@ -24,23 +24,6 @@ config :cobblemon_ui, CobblemonUiWeb.Endpoint,
|
||||
http: [port: String.to_integer(System.get_env("PORT", "4000"))]
|
||||
|
||||
if config_env() == :prod do
|
||||
database_url =
|
||||
System.get_env("DATABASE_URL") ||
|
||||
raise """
|
||||
environment variable DATABASE_URL is missing.
|
||||
For example: ecto://USER:PASS@HOST/DATABASE
|
||||
"""
|
||||
|
||||
maybe_ipv6 = if System.get_env("ECTO_IPV6") in ~w(true 1), do: [:inet6], else: []
|
||||
|
||||
config :cobblemon_ui, CobblemonUi.Repo,
|
||||
# ssl: true,
|
||||
url: database_url,
|
||||
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
|
||||
# For machines with several cores, consider starting multiple pools of `pool_size`
|
||||
# pool_count: 4,
|
||||
socket_options: maybe_ipv6
|
||||
|
||||
# The secret key base is used to sign/encrypt cookies and other secrets.
|
||||
# A default value is used in config/dev.exs and config/test.exs but you
|
||||
# want to use a different value for prod and you most likely don't want
|
||||
@@ -100,21 +83,4 @@ if config_env() == :prod do
|
||||
#
|
||||
# Check `Plug.SSL` for all available options in `force_ssl`.
|
||||
|
||||
# ## Configuring the mailer
|
||||
#
|
||||
# In production you need to configure the mailer to use a different adapter.
|
||||
# Here is an example configuration for Mailgun:
|
||||
#
|
||||
# config :cobblemon_ui, CobblemonUi.Mailer,
|
||||
# adapter: Swoosh.Adapters.Mailgun,
|
||||
# api_key: System.get_env("MAILGUN_API_KEY"),
|
||||
# domain: System.get_env("MAILGUN_DOMAIN")
|
||||
#
|
||||
# Most non-SMTP adapters require an API client. Swoosh supports Req, Hackney,
|
||||
# and Finch out-of-the-box. This configuration is typically done at
|
||||
# compile-time in your config/prod.exs:
|
||||
#
|
||||
# config :swoosh, :api_client, Swoosh.ApiClient.Req
|
||||
#
|
||||
# See https://hexdocs.pm/swoosh/Swoosh.html#module-installation for details.
|
||||
end
|
||||
|
||||
@@ -1,31 +1,12 @@
|
||||
import Config
|
||||
|
||||
# Configure your database
|
||||
#
|
||||
# The MIX_TEST_PARTITION environment variable can be used
|
||||
# to provide built-in test partitioning in CI environment.
|
||||
# Run `mix help test` for more information.
|
||||
config :cobblemon_ui, CobblemonUi.Repo,
|
||||
username: "postgres",
|
||||
password: "postgres",
|
||||
hostname: "localhost",
|
||||
database: "cobblemon_ui_test#{System.get_env("MIX_TEST_PARTITION")}",
|
||||
pool: Ecto.Adapters.SQL.Sandbox,
|
||||
pool_size: System.schedulers_online() * 2
|
||||
|
||||
# We don't run a server during test. If one is required,
|
||||
# you can enable the server option below.
|
||||
config :cobblemon_ui, CobblemonUiWeb.Endpoint,
|
||||
http: [ip: {127, 0, 0, 1}, port: 4002],
|
||||
secret_key_base: "NE+BBYAcvk81zyuwa6gcpnQ6Blxzxt74xNjOFKSDZktd21/dmB514ivn68FuYStm",
|
||||
secret_key_base: "8zEOBwiMaekwU6JuOw8bUrc00fLcFlj8CNYBcph1E0ngkfhJeWbKKI17Owj9cQw+",
|
||||
server: false
|
||||
|
||||
# In test we don't send emails
|
||||
config :cobblemon_ui, CobblemonUi.Mailer, adapter: Swoosh.Adapters.Test
|
||||
|
||||
# Disable swoosh api client as it is only required for production adapters
|
||||
config :swoosh, :api_client, false
|
||||
|
||||
# Print only warnings and errors during test
|
||||
config :logger, level: :warning
|
||||
|
||||
|
||||
Reference in New Issue
Block a user