Skip to content

Commit

Permalink
Delete the DB stuff and put results
Browse files Browse the repository at this point in the history
  • Loading branch information
IciaCarroBarallobre committed Oct 14, 2024
1 parent b06519a commit 61796de
Show file tree
Hide file tree
Showing 33 changed files with 69 additions and 675 deletions.
8 changes: 0 additions & 8 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
# General application configuration
import Config

config :exploring_beam_community,
ecto_repos: [ExploringBeamCommunity.Repo]

# Configures the endpoint
config :exploring_beam_community, ExploringBeamCommunityWeb.Endpoint,
url: [host: "localhost"],
Expand All @@ -24,11 +21,6 @@ config :exploring_beam_community, ExploringBeamCommunityWeb.Endpoint,
live_view: [signing_salt: "KEeqDH6/"]

############ CONFIG NEWSLETTER
# Oban
config :exploring_beam_community, Oban,
repo: ExploringBeamCommunity.Repo,
plugins: [Oban.Plugins.Pruner],
queues: [default: 10, scheduled: 5]

# Configure esbuild (the version is required)
config :esbuild,
Expand Down
15 changes: 0 additions & 15 deletions config/dev.exs
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
import Config

# Configure your database
config :exploring_beam_community, ExploringBeamCommunity.Repo,
username: "postgres",
password: "postgres",
hostname: "localhost",
database: "exploring_beam_community_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.
#
Expand Down Expand Up @@ -70,8 +60,3 @@ config :phoenix, :stacktrace_depth, 20

# Initialize plugs at runtime for faster development compilation
config :phoenix, :plug_init_mode, :runtime

# Disable swoosh api client as it is only required for production adapters.
config :swoosh, :api_client, false

config :exploring_beam_community, ExploringBeamCommunity.Mailer, adapter: Swoosh.Adapters.Local
3 changes: 0 additions & 3 deletions config/prod.exs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@ config :logger, level: :info

# Runtime production configuration, including reading
# of environment variables, is done on config/runtime.exs.

# Mailer - Disable Swoosh Local Memory Storage
config :swoosh, local: false
29 changes: 0 additions & 29 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,7 @@ if System.get_env("PHX_SERVER") do
config :exploring_beam_community, ExploringBeamCommunityWeb.Endpoint, server: true
end

# DB PROD CONFIGURATION
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 :exploring_beam_community, ExploringBeamCommunity.Repo,
# ssl: true,
url: database_url,
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
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
Expand Down Expand Up @@ -103,17 +88,3 @@ if config_env() == :prod do
#
# Check `Plug.SSL` for all available options in `force_ssl`.
end

# Mail
config :swoosh, :api_client, Swoosh.ApiClient.Hackney

config :exploring_beam_community, ExploringBeamCommunity.Mailer,
adapter: Swoosh.Adapters.SMTP,
relay: System.get_env("MAIL_HOST"),
username: System.get_env("MAIL_USERNAME"),
password: System.get_env("MAIL_PASSWORD"),
ssl: false,
tls: :always,
auth: :always,
port: String.to_integer(System.get_env("MAIL_PORT") || "587"),
from: {System.get_env("MAIL_FROM_NAME"), System.get_env("MAIL_FROM_ADDRESS")}
18 changes: 0 additions & 18 deletions config/test.exs
Original file line number Diff line number Diff line change
@@ -1,32 +1,14 @@
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 :exploring_beam_community, ExploringBeamCommunity.Repo,
username: "postgres",
password: "postgres",
hostname: "localhost",
database: "exploring_beam_community_test#{System.get_env("MIX_TEST_PARTITION")}",
pool: Ecto.Adapters.SQL.Sandbox,
pool_size: 10

# We don't run a server during test. If one is required,
# you can enable the server option below.
config :exploring_beam_community, ExploringBeamCommunityWeb.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 4002],
secret_key_base: "TvG0FoiH9PYqICwdqc4TyJTeNmgKOWfCML3go99a1yxhJ04DDMT3LLkwOQuyO+0T",
server: false

# 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

# Initialize plugs at runtime for faster test compilation
config :phoenix, :plug_init_mode, :runtime

config :my_app, MyApp.Mailer, adapter: Swoosh.Adapters.Test
3 changes: 0 additions & 3 deletions lib/exploring_beam_community/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ defmodule ExploringBeamCommunity.Application do
@impl true
def start(_type, _args) do
children = [
# Start the Ecto repository
ExploringBeamCommunity.Repo,
{Oban, Application.fetch_env!(:exploring_beam_community, Oban)},
# Start the PubSub system
{Phoenix.PubSub, name: ExploringBeamCommunity.PubSub},
# Start the Endpoint (http/https)
Expand Down
26 changes: 0 additions & 26 deletions lib/exploring_beam_community/emails.ex

This file was deleted.

17 changes: 0 additions & 17 deletions lib/exploring_beam_community/emails/email.ex

This file was deleted.

3 changes: 0 additions & 3 deletions lib/exploring_beam_community/mailer.ex

This file was deleted.

67 changes: 0 additions & 67 deletions lib/exploring_beam_community/predef_email.ex

This file was deleted.

28 changes: 0 additions & 28 deletions lib/exploring_beam_community/release.ex

This file was deleted.

5 changes: 0 additions & 5 deletions lib/exploring_beam_community/repo.ex

This file was deleted.

Loading

0 comments on commit 61796de

Please sign in to comment.