From 91581038c27a013311bc16dff08acf078e7f81e1 Mon Sep 17 00:00:00 2001 From: Antonio Date: Wed, 22 Nov 2023 09:29:34 -0300 Subject: [PATCH 1/2] feat: migrate to sqlite --- .gitignore | 2 ++ .prod.env | 2 +- Dockerfile | 2 ++ config/config.exs | 9 ------ config/dev.exs | 8 +---- config/prod.exs | 6 ---- config/runtime.exs | 32 ++----------------- config/test.exs | 11 +------ docker-compose-dev.yaml | 9 ------ docker-compose.yaml | 18 ----------- lib/harpoon/application.ex | 6 ++-- lib/harpoon/mailer.ex | 4 --- lib/harpoon/release.ex | 6 ++-- lib/harpoon/repo.ex | 2 +- .../workers/migration_runner_worker.ex | 20 ++++++++++++ lib/harpoon_web/router.ex | 3 +- mix.exs | 3 +- mix.lock | 12 +++++-- 18 files changed, 47 insertions(+), 108 deletions(-) delete mode 100755 docker-compose-dev.yaml delete mode 100644 lib/harpoon/mailer.ex create mode 100644 lib/harpoon/workers/migration_runner_worker.ex diff --git a/.gitignore b/.gitignore index 9d295ed..708cdc5 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,5 @@ harpoon-*.tar # In case you use Node.js/npm, you want to ignore these. npm-debug.log /assets/node_modules/ + +/priv/data diff --git a/.prod.env b/.prod.env index 84df8a0..3dd6244 100644 --- a/.prod.env +++ b/.prod.env @@ -1,4 +1,4 @@ -DATABASE_URL="psql://postgres:postgres@db/harpoon_prod" +DATABASE_FILE="/app/data/harpoon_prod.sqlite" SECRET_KEY_BASE="vFZutSk8Cyq+CoJwIuHhqeJ7Y9OBf3LGVoQ9hm/IkfHU5MVa/BmJTZOYLyeOutC6" PHX_SERVER="true" PHX_HOST="localhost" diff --git a/Dockerfile b/Dockerfile index 959d1d7..1243623 100644 --- a/Dockerfile +++ b/Dockerfile @@ -95,4 +95,6 @@ USER nobody # above and adding an entrypoint. See https://github.com/krallin/tini for details # ENTRYPOINT ["/tini", "--"] +ENV DATABASE_FILE /app/data/harpoon_prod.sqlite + CMD ["/app/bin/server"] diff --git a/config/config.exs b/config/config.exs index 34b6546..925b704 100644 --- a/config/config.exs +++ b/config/config.exs @@ -22,15 +22,6 @@ config :harpoon, HarpoonWeb.Endpoint, pubsub_server: Harpoon.PubSub, live_view: [signing_salt: "Rl8aH79d"] -# Configures 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 :harpoon, Harpoon.Mailer, adapter: Swoosh.Adapters.Local - # Configure esbuild (the version is required) config :esbuild, version: "0.17.11", diff --git a/config/dev.exs b/config/dev.exs index d892d52..9a0cb47 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -2,10 +2,7 @@ import Config # Configure your database config :harpoon, Harpoon.Repo, - username: "postgres", - password: "postgres", - hostname: "localhost", - database: "harpoon_dev", + database: "priv/data/harpoon_dev.sqlite", stacktrace: true, show_sensitive_data_on_connection_error: true, pool_size: 10 @@ -77,6 +74,3 @@ config :phoenix, :plug_init_mode, :runtime # Include HEEx debug annotations as HTML comments in rendered markup config :phoenix_live_view, :debug_heex_annotations, true - -# Disable swoosh api client as it is only required for production adapters. -config :swoosh, :api_client, false diff --git a/config/prod.exs b/config/prod.exs index 3bd556a..a900a40 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -7,12 +7,6 @@ import Config # before starting your production server. config :harpoon, HarpoonWeb.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json" -# Configures Swoosh API Client -config :swoosh, api_client: Swoosh.ApiClient.Finch, finch_name: Harpoon.Finch - -# Disable Swoosh Local Memory Storage -config :swoosh, local: false - # Do not print debug messages in production config :logger, level: :info diff --git a/config/runtime.exs b/config/runtime.exs index 74439b4..e7bcae5 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -21,20 +21,10 @@ if System.get_env("PHX_SERVER") do end 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 :harpoon, Harpoon.Repo, # ssl: true, - url: database_url, - pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"), - socket_options: maybe_ipv6 + database: System.get_env("DATABASE_FILE", "~/.harpoon/harpoon_prod.sqlite"), + pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10") # 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 @@ -96,22 +86,4 @@ if config_env() == :prod do # force_ssl: [hsts: true] # # 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. - # Also, you may need to configure the Swoosh API client of your choice if you - # are not using SMTP. Here is an example of the configuration: - # - # config :harpoon, Harpoon.Mailer, - # adapter: Swoosh.Adapters.Mailgun, - # api_key: System.get_env("MAILGUN_API_KEY"), - # domain: System.get_env("MAILGUN_DOMAIN") - # - # For this example you need include a HTTP client required by Swoosh API client. - # Swoosh supports Hackney and Finch out of the box: - # - # config :swoosh, :api_client, Swoosh.ApiClient.Hackney - # - # See https://hexdocs.pm/swoosh/Swoosh.html#module-installation for details. end diff --git a/config/test.exs b/config/test.exs index 71f26e1..2672df2 100644 --- a/config/test.exs +++ b/config/test.exs @@ -6,10 +6,7 @@ import Config # to provide built-in test partitioning in CI environment. # Run `mix help test` for more information. config :harpoon, Harpoon.Repo, - username: "postgres", - password: "postgres", - hostname: "localhost", - database: "harpoon_test#{System.get_env("MIX_TEST_PARTITION")}", + database: "priv/data/harpoon_test#{System.get_env("MIX_TEST_PARTITION")}", pool: Ecto.Adapters.SQL.Sandbox, pool_size: 10 @@ -20,12 +17,6 @@ config :harpoon, HarpoonWeb.Endpoint, secret_key_base: "6AyjzUWkEzxZTWHtark38i+9IbfkFh6LOcs4t/rylbncz8PxRHOw5EmHQrrP+GyC", server: false -# In test we don't send emails. -config :harpoon, Harpoon.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 diff --git a/docker-compose-dev.yaml b/docker-compose-dev.yaml deleted file mode 100755 index 4293661..0000000 --- a/docker-compose-dev.yaml +++ /dev/null @@ -1,9 +0,0 @@ -version: "3.2" -services: - db: - image: postgres:16 - environment: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - ports: - - 5432:5432 diff --git a/docker-compose.yaml b/docker-compose.yaml index ddf4522..3beb768 100755 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,27 +1,9 @@ version: "3" services: - db: - image: postgres:16.0 - environment: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: harpoon_prod - - migration: - depends_on: - - db - build: - context: . - dockerfile: Dockerfile - env_file: .prod.env - command: ["/app/bin/migrate"] - app: build: context: . dockerfile: Dockerfile - depends_on: - - migration env_file: .prod.env ports: - 4000:4000 diff --git a/lib/harpoon/application.ex b/lib/harpoon/application.ex index 06e6b8f..83b8bd7 100644 --- a/lib/harpoon/application.ex +++ b/lib/harpoon/application.ex @@ -6,20 +6,18 @@ defmodule Harpoon.Application do use Application alias Harpoon.Workers.CapturedRequestsWorker + alias Harpoon.Workers.MigrationRunnerWorker @impl true def start(_type, _args) do children = [ HarpoonWeb.Telemetry, Harpoon.Repo, + MigrationRunnerWorker, {DNSCluster, query: Application.get_env(:harpoon, :dns_cluster_query) || :ignore}, {Phoenix.PubSub, name: Harpoon.PubSub}, - # Start the Finch HTTP client for sending emails {Finch, name: Harpoon.Finch}, CapturedRequestsWorker, - # Start a worker by calling: Harpoon.Worker.start_link(arg) - # {Harpoon.Worker, arg}, - # Start to serve requests, typically the last entry HarpoonWeb.Endpoint ] diff --git a/lib/harpoon/mailer.ex b/lib/harpoon/mailer.ex deleted file mode 100644 index 9035dd3..0000000 --- a/lib/harpoon/mailer.ex +++ /dev/null @@ -1,4 +0,0 @@ -defmodule Harpoon.Mailer do - @moduledoc false - use Swoosh.Mailer, otp_app: :harpoon -end diff --git a/lib/harpoon/release.ex b/lib/harpoon/release.ex index b93345d..b45ee4d 100644 --- a/lib/harpoon/release.ex +++ b/lib/harpoon/release.ex @@ -5,8 +5,10 @@ defmodule Harpoon.Release do """ @app :harpoon - def migrate do - load_app() + def migrate(should_load_app \\ true) do + if should_load_app do + load_app() + end for repo <- repos() do {:ok, _, _} = Ecto.Migrator.with_repo(repo, &Ecto.Migrator.run(&1, :up, all: true)) diff --git a/lib/harpoon/repo.ex b/lib/harpoon/repo.ex index 0248a01..767e5d5 100644 --- a/lib/harpoon/repo.ex +++ b/lib/harpoon/repo.ex @@ -1,5 +1,5 @@ defmodule Harpoon.Repo do use Ecto.Repo, otp_app: :harpoon, - adapter: Ecto.Adapters.Postgres + adapter: Ecto.Adapters.SQLite3 end diff --git a/lib/harpoon/workers/migration_runner_worker.ex b/lib/harpoon/workers/migration_runner_worker.ex new file mode 100644 index 0000000..ee407eb --- /dev/null +++ b/lib/harpoon/workers/migration_runner_worker.ex @@ -0,0 +1,20 @@ +defmodule Harpoon.Workers.MigrationRunnerWorker do + @moduledoc false + use GenServer, restart: :transient + + def start_link(_) do + GenServer.start_link(__MODULE__, [], name: __MODULE__) + end + + def init(_args) do + Harpoon.Repo + |> Ecto.Migrator.migrations() + |> Enum.any?(&match?({:down, _, _}, &1)) + |> case do + true -> Harpoon.Release.migrate(false) + false -> :ok + end + + :ignore + end +end diff --git a/lib/harpoon_web/router.ex b/lib/harpoon_web/router.ex index c8ee7e2..8080002 100644 --- a/lib/harpoon_web/router.ex +++ b/lib/harpoon_web/router.ex @@ -27,7 +27,7 @@ defmodule HarpoonWeb.Router do # pipe_through :api # end - # Enable LiveDashboard and Swoosh mailbox preview in development + # Enable LiveDashboard preview in development if Application.compile_env(:harpoon, :dev_routes) do # If you want to use the LiveDashboard in production, you should put # it behind authentication and allow only admins to access it. @@ -40,7 +40,6 @@ defmodule HarpoonWeb.Router do pipe_through :browser live_dashboard "/dashboard", metrics: HarpoonWeb.Telemetry - forward "/mailbox", Plug.Swoosh.MailboxPreview end end end diff --git a/mix.exs b/mix.exs index fae55d6..803cf83 100644 --- a/mix.exs +++ b/mix.exs @@ -35,7 +35,7 @@ defmodule Harpoon.MixProject do {:phoenix, "~> 1.7.9"}, {:phoenix_ecto, "~> 4.4"}, {:ecto_sql, "~> 3.10"}, - {:postgrex, ">= 0.0.0"}, + {:ecto_sqlite3, "~> 0.12.0"}, {:phoenix_html, "~> 3.3"}, {:phoenix_live_reload, "~> 1.2", only: :dev}, {:phoenix_live_view, "~> 0.20.1"}, @@ -43,7 +43,6 @@ defmodule Harpoon.MixProject do {:phoenix_live_dashboard, "~> 0.8.2"}, {:esbuild, "~> 0.7", runtime: Mix.env() == :dev}, {:tailwind, "~> 0.2.0", runtime: Mix.env() == :dev}, - {:swoosh, "~> 1.3"}, {:finch, "~> 0.13"}, {:telemetry_metrics, "~> 0.6"}, {:telemetry_poller, "~> 1.0"}, diff --git a/mix.lock b/mix.lock index 2b1dea7..b3ab77b 100644 --- a/mix.lock +++ b/mix.lock @@ -1,21 +1,28 @@ %{ "castore": {:hex, :castore, "1.0.4", "ff4d0fb2e6411c0479b1d965a814ea6d00e51eb2f58697446e9c41a97d940b28", [:mix], [], "hexpm", "9418c1b8144e11656f0be99943db4caf04612e3eaecefb5dae9a2a87565584f8"}, + "cc_precompiler": {:hex, :cc_precompiler, "0.1.9", "e8d3364f310da6ce6463c3dd20cf90ae7bbecbf6c5203b98bf9b48035592649b", [:mix], [{:elixir_make, "~> 0.7", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "9dcab3d0f3038621f1601f13539e7a9ee99843862e66ad62827b0c42b2f58a54"}, + "connection": {:hex, :connection, "1.1.0", "ff2a49c4b75b6fb3e674bfc5536451607270aac754ffd1bdfe175abe4a6d7a68", [:mix], [], "hexpm", "722c1eb0a418fbe91ba7bd59a47e28008a189d47e37e0e7bb85585a016b2869c"}, "cowboy": {:hex, :cowboy, "2.10.0", "ff9ffeff91dae4ae270dd975642997afe2a1179d94b1887863e43f681a203e26", [:make, :rebar3], [{:cowlib, "2.12.1", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "3afdccb7183cc6f143cb14d3cf51fa00e53db9ec80cdcd525482f5e99bc41d6b"}, "cowboy_telemetry": {:hex, :cowboy_telemetry, "0.4.0", "f239f68b588efa7707abce16a84d0d2acf3a0f50571f8bb7f56a15865aae820c", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7d98bac1ee4565d31b62d59f8823dfd8356a169e7fcbb83831b8a5397404c9de"}, "cowlib": {:hex, :cowlib, "2.12.1", "a9fa9a625f1d2025fe6b462cb865881329b5caff8f1854d1cbc9f9533f00e1e1", [:make, :rebar3], [], "hexpm", "163b73f6367a7341b33c794c4e88e7dbfe6498ac42dcd69ef44c5bc5507c8db0"}, "db_connection": {:hex, :db_connection, "2.6.0", "77d835c472b5b67fc4f29556dee74bf511bbafecdcaf98c27d27fa5918152086", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c2f992d15725e721ec7fbc1189d4ecdb8afef76648c746a8e1cad35e3b8a35f3"}, "decimal": {:hex, :decimal, "2.1.1", "5611dca5d4b2c3dd497dec8f68751f1f1a54755e8ed2a966c2633cf885973ad6", [:mix], [], "hexpm", "53cfe5f497ed0e7771ae1a475575603d77425099ba5faef9394932b35020ffcc"}, "dns_cluster": {:hex, :dns_cluster, "0.1.1", "73b4b2c3ec692f8a64276c43f8c929733a9ab9ac48c34e4c0b3d9d1b5cd69155", [:mix], [], "hexpm", "03a3f6ff16dcbb53e219b99c7af6aab29eb6b88acf80164b4bd76ac18dc890b3"}, - "ecto": {:hex, :ecto, "3.10.3", "eb2ae2eecd210b4eb8bece1217b297ad4ff824b4384c0e3fdd28aaf96edd6135", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "44bec74e2364d491d70f7e42cd0d690922659d329f6465e89feb8a34e8cd3433"}, - "ecto_sql": {:hex, :ecto_sql, "3.10.2", "6b98b46534b5c2f8b8b5f03f126e75e2a73c64f3c071149d32987a5378b0fdbd", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.10.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.6.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.16.0 or ~> 0.17.0 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "68c018debca57cb9235e3889affdaec7a10616a4e3a80c99fa1d01fdafaa9007"}, + "ecto": {:hex, :ecto, "3.11.0", "ff8614b4e70a774f9d39af809c426def80852048440e8785d93a6e91f48fec00", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7769dad267ef967310d6e988e92d772659b11b09a0c015f101ce0fff81ce1f81"}, + "ecto_sql": {:hex, :ecto_sql, "3.11.0", "c787b24b224942b69c9ff7ab9107f258ecdc68326be04815c6cce2941b6fad1c", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.11.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.6.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.16.0 or ~> 0.17.0 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "77aa3677169f55c2714dda7352d563002d180eb33c0dc29cd36d39c0a1a971f5"}, + "ecto_sqlite3": {:hex, :ecto_sqlite3, "0.12.0", "9ee845ac45a76e3c5c0fe65898f3538f5b0969912a95f0beef3d4ae8e63f6a06", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:ecto, "~> 3.10", [hex: :ecto, repo: "hexpm", optional: false]}, {:ecto_sql, "~> 3.10", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:exqlite, "~> 0.9", [hex: :exqlite, repo: "hexpm", optional: false]}], "hexpm", "4eaf8550df1fd0043bcf039a5dce407fd8afc30a115ced173fe6b9815eeedb55"}, + "elixir_make": {:hex, :elixir_make, "0.7.7", "7128c60c2476019ed978210c245badf08b03dbec4f24d05790ef791da11aa17c", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}], "hexpm", "5bc19fff950fad52bbe5f211b12db9ec82c6b34a9647da0c2224b8b8464c7e6c"}, "esbuild": {:hex, :esbuild, "0.8.1", "0cbf919f0eccb136d2eeef0df49c4acf55336de864e63594adcea3814f3edf41", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "25fc876a67c13cb0a776e7b5d7974851556baeda2085296c14ab48555ea7560f"}, + "etso": {:git, "https://github.com/evadne/etso.git", "11381c26634da82e466ac4e6d7fcba9fed0e5bbe", [branch: "feature/storage-api"]}, "expo": {:hex, :expo, "0.4.1", "1c61d18a5df197dfda38861673d392e642649a9cef7694d2f97a587b2cfb319b", [:mix], [], "hexpm", "2ff7ba7a798c8c543c12550fa0e2cbc81b95d4974c65855d8d15ba7b37a1ce47"}, + "exqlite": {:hex, :exqlite, "0.17.0", "865ab503debde7913ffa02b58838ab92885165978f4c88d8169ee8688c655d1e", [:make, :mix], [{:cc_precompiler, "~> 0.1", [hex: :cc_precompiler, repo: "hexpm", optional: false]}, {:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.7", [hex: :elixir_make, repo: "hexpm", optional: false]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "719fa7986fed242839629a907d60f774000c1d2dc03ba6ba05fcd30579f2ab45"}, "file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"}, "finch": {:hex, :finch, "0.16.0", "40733f02c89f94a112518071c0a91fe86069560f5dbdb39f9150042f44dcfb1a", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.3", [hex: :mint, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.4 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 0.2.6 or ~> 1.0", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "f660174c4d519e5fec629016054d60edd822cdfe2b7270836739ac2f97735ec5"}, "floki": {:hex, :floki, "0.35.2", "87f8c75ed8654b9635b311774308b2760b47e9a579dabf2e4d5f1e1d42c39e0b", [:mix], [], "hexpm", "6b05289a8e9eac475f644f09c2e4ba7e19201fd002b89c28c1293e7bd16773d9"}, "gettext": {:hex, :gettext, "0.23.1", "821e619a240e6000db2fc16a574ef68b3bd7fe0167ccc264a81563cc93e67a31", [:mix], [{:expo, "~> 0.4.0", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "19d744a36b809d810d610b57c27b934425859d158ebd56561bc41f7eeb8795db"}, "hpax": {:hex, :hpax, "0.1.2", "09a75600d9d8bbd064cdd741f21fc06fc1f4cf3d0fcc335e5aa19be1a7235c84", [:mix], [], "hexpm", "2c87843d5a23f5f16748ebe77969880e29809580efdaccd615cd3bed628a8c13"}, "jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"}, + "logflare_etso": {:hex, :logflare_etso, "1.1.2", "040bd3e482aaf0ed20080743b7562242ec5079fd88a6f9c8ce5d8298818292e9", [:mix], [{:ecto, "~> 3.8", [hex: :ecto, repo: "hexpm", optional: false]}], "hexpm", "ab96be42900730a49b132891f43a9be1d52e4ad3ee9ed9cb92565c5f87345117"}, "mime": {:hex, :mime, "2.0.5", "dc34c8efd439abe6ae0343edbb8556f4d63f178594894720607772a041b04b02", [:mix], [], "hexpm", "da0d64a365c45bc9935cc5c8a7fc5e49a0e0f9932a761c55d6c52b142780a05c"}, "mint": {:hex, :mint, "1.5.1", "8db5239e56738552d85af398798c80648db0e90f343c8469f6c6d8898944fb6f", [:mix], [{:castore, "~> 0.1.0 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:hpax, "~> 0.1.1", [hex: :hpax, repo: "hexpm", optional: false]}], "hexpm", "4a63e1e76a7c3956abd2c72f370a0d0aecddc3976dea5c27eccbecfa5e7d5b1e"}, "nimble_options": {:hex, :nimble_options, "1.0.2", "92098a74df0072ff37d0c12ace58574d26880e522c22801437151a159392270e", [:mix], [], "hexpm", "fd12a8db2021036ce12a309f26f564ec367373265b53e25403f0ee697380f1b8"}, @@ -34,7 +41,6 @@ "postgrex": {:hex, :postgrex, "0.17.3", "c92cda8de2033a7585dae8c61b1d420a1a1322421df84da9a82a6764580c503d", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "946cf46935a4fdca7a81448be76ba3503cff082df42c6ec1ff16a4bdfbfb098d"}, "ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"}, "styler": {:hex, :styler, "0.10.0", "9682e8d13faeb8fcd4ea77db867d911ff462b7cb097419266e005f27057cd04c", [:mix], [], "hexpm", "6e033169f1eb7026a3f3f7ab3ff5429c877e35b65db98f27c21b8d3bfd0b97f5"}, - "swoosh": {:hex, :swoosh, "1.14.0", "710e363e114dedb4080b737e0307f5410887ffc9a239f818231e5618b6b84e1b", [:mix], [{:cowboy, "~> 1.1 or ~> 2.4", [hex: :cowboy, repo: "hexpm", optional: true]}, {:ex_aws, "~> 2.1", [hex: :ex_aws, repo: "hexpm", optional: true]}, {:finch, "~> 0.6", [hex: :finch, repo: "hexpm", optional: true]}, {:gen_smtp, "~> 0.13 or ~> 1.0", [hex: :gen_smtp, repo: "hexpm", optional: true]}, {:hackney, "~> 1.9", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:mail, "~> 0.2", [hex: :mail, repo: "hexpm", optional: true]}, {:mime, "~> 1.1 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: true]}, {:plug_cowboy, ">= 1.0.0", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "dccfc986ac99c18345ab3e1a8b934b2d817fd6d59a2494f0af78502184c71025"}, "tailwind": {:hex, :tailwind, "0.2.1", "83d8eadbe71a8e8f67861fe7f8d51658ecfb258387123afe4d9dc194eddc36b0", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}], "hexpm", "e8a13f6107c95f73e58ed1b4221744e1eb5a093cd1da244432067e19c8c9a277"}, "telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"}, "telemetry_metrics": {:hex, :telemetry_metrics, "0.6.1", "315d9163a1d4660aedc3fee73f33f1d355dcc76c5c3ab3d59e76e3edf80eef1f", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7be9e0871c41732c233be71e4be11b96e56177bf15dde64a8ac9ce72ac9834c6"}, From 8e397b75a3871e63e2114f1fd43d43c7f9ac7df3 Mon Sep 17 00:00:00 2001 From: Antonio Date: Wed, 22 Nov 2023 09:30:31 -0300 Subject: [PATCH 2/2] chore: remove psql refs --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 607825e..a06d19e 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ The tool is intended for testing, debugging, and monitoring webhooks, APIs, and - Create temporary endpoints for testing and monitoring HTTP requests. - Inspect HTTP requests in real-time using Phoenix LiveView. -- Store request data in a PostgreSQL database for future analysis and reference. +- Store request data in a Sqlite database for easy analysis and setup. - Lightweight and easy to use. ## Prerequisites @@ -40,7 +40,7 @@ The tool is intended for testing, debugging, and monitoring webhooks, APIs, and ### Local Version - Elixir - Erlang -- PostgreSQL +- Sqlite ## Installation