From 21d1aa436971056e725e6862ea01d2da640728b9 Mon Sep 17 00:00:00 2001 From: Robert Prehn <3952444+prehnRA@users.noreply.github.com> Date: Fri, 28 May 2021 12:38:37 -0500 Subject: [PATCH 01/12] fix: Share sessions between multiple pods --- .gitignore | 4 ++ .gitlab-ci.yml | 12 +++- Dockerfile | 6 +- README.md | 9 +++ apps/admin/lib/admin/endpoint.ex | 2 +- apps/content/lib/content_web/endpoint.ex | 2 +- .../lib/auth/mnesia_cluster_supervisor.ex | 17 ++++++ apps/core/lib/core/application.ex | 4 ++ apps/core/mix.exs | 4 +- .../test/support/empty_cluster_strategy.ex | 24 ++++++++ config/config.exs | 5 +- config/dev.exs | 7 +++ config/prod.exs | 14 +++++ config/test.exs | 7 +++ infrastructure_templates/kube.yaml.dot | 61 +++++++++++++++++++ mix.lock | 11 ++-- 16 files changed, 177 insertions(+), 12 deletions(-) create mode 100644 apps/core/lib/auth/mnesia_cluster_supervisor.ex create mode 100644 apps/core/test/support/empty_cluster_strategy.ex diff --git a/.gitignore b/.gitignore index 32a515c0..c4e2a1a7 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,10 @@ node_modules # this depending on your deployment strategy. /priv/static/ +# Mnesia DBs +/apps/*/priv/mnesia/ +/priv/mnesia/ + # Lock file for Brew, since the versions aren't really stable & isolated anyway Brewfile.lock.json diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a596e098..27812d1f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,7 +17,7 @@ variables: # parallel, in case the build passes. test: stage: test - image: "elixir:1.10" + image: "elixir:1.10.4-alpine" cache: paths: - _build/ @@ -48,12 +48,14 @@ build_image_for_commit: # if everything passes. - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA # Pull out the built _build/prod directory so we can cache it! - - docker cp `docker create $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA`:/root/app/_build/prod _build + - CONTAINER_HANDLE=`docker create $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA` + - docker cp $CONTAINER_HANDLE:/root/app/_build/prod _build + - docker cp $CONTAINER_HANDLE:/root/app/deps deps # If tests pass, tag the commit and update package versions deploy_to_tags: stage: deploy_tags - needs: ['test'] + needs: ['test', 'build_image_for_commit'] image: "node:15.0" only: - master @@ -64,6 +66,10 @@ deploy_to_tags: paths: - node_modules/ script: + - export GIT_AUTHOR_NAME=$GITLAB_USER_NAME + - export GIT_AUTHOR_EMAIL=$GITLAB_USER_EMAIL + - export GIT_COMMITTER_NAME=$GITLAB_USER_NAME + - export GIT_COMMITTER_EMAIL=$GITLAB_USER_EMAIL - npm install - npx semantic-release --repository-url=$CI_REPOSITORY_URL - script/generate-build-version diff --git a/Dockerfile b/Dockerfile index 1d407f99..967c78a1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,8 @@ RUN mix local.hex --force \ && mix local.rebar --force EXPOSE 4000 +# Default EPMD port +EXPOSE 4369 ARG MIX_ENV=prod RUN echo ${MIX_ENV} @@ -58,4 +60,6 @@ RUN mix phx.digest RUN script/restore-timestamps -CMD ["mix", "phx.server"] +RUN mkdir -p /root/app/priv/ + +CMD elixir --name ${NAME:=legendary}@$(hostname -f) -S mix phx.server diff --git a/README.md b/README.md index 6498f862..989f3625 100644 --- a/README.md +++ b/README.md @@ -55,3 +55,12 @@ The CI script will automatically tag successful builds. To do this, you will need to configure a [CI variable](-/settings/ci_cd) named `GITLAB_TOKEN`. This token should be a [personal access token](/-/profile/personal_access_tokens) with `read_repository, write_repository` permissions. + + +# Support + +Want to support development? Chip in on buymeacoffee: + + + Buy Me A Coffee + diff --git a/apps/admin/lib/admin/endpoint.ex b/apps/admin/lib/admin/endpoint.ex index db654fbd..fc36a79a 100644 --- a/apps/admin/lib/admin/endpoint.ex +++ b/apps/admin/lib/admin/endpoint.ex @@ -57,6 +57,6 @@ defmodule Legendary.Admin.Endpoint do plug Plug.MethodOverride plug Plug.Head plug Plug.Session, @session_options - plug Pow.Plug.Session, otp_app: :admin + plug Pow.Plug.Session, otp_app: :core plug Legendary.Admin.Router end diff --git a/apps/content/lib/content_web/endpoint.ex b/apps/content/lib/content_web/endpoint.ex index 3dec4e0e..d1c6d22d 100644 --- a/apps/content/lib/content_web/endpoint.ex +++ b/apps/content/lib/content_web/endpoint.ex @@ -57,6 +57,6 @@ defmodule Legendary.Content.Endpoint do plug Plug.MethodOverride plug Plug.Head plug Plug.Session, @session_options - plug Pow.Plug.Session, otp_app: :content + plug Pow.Plug.Session, otp_app: :core plug Legendary.Content.Router end diff --git a/apps/core/lib/auth/mnesia_cluster_supervisor.ex b/apps/core/lib/auth/mnesia_cluster_supervisor.ex new file mode 100644 index 00000000..f3336624 --- /dev/null +++ b/apps/core/lib/auth/mnesia_cluster_supervisor.ex @@ -0,0 +1,17 @@ +defmodule Legendary.Auth.MnesiaClusterSupervisor do + use Supervisor + + def start_link(init_arg) do + Supervisor.start_link(__MODULE__, init_arg, name: __MODULE__) + end + + @impl true + def init(_init_arg) do + children = [ + {Pow.Store.Backend.MnesiaCache, extra_db_nodes: Node.list()}, + Pow.Store.Backend.MnesiaCache.Unsplit + ] + + Supervisor.init(children, strategy: :one_for_one) + end +end diff --git a/apps/core/lib/core/application.ex b/apps/core/lib/core/application.ex index 50979305..eb55b834 100644 --- a/apps/core/lib/core/application.ex +++ b/apps/core/lib/core/application.ex @@ -6,7 +6,11 @@ defmodule Legendary.Core.Application do use Application def start(_type, _args) do + topologies = Application.get_env(:libcluster, :topologies) + children = [ + {Cluster.Supervisor, [topologies, [name: Legendary.Core.ClusterSupervisor]]}, + Legendary.Auth.MnesiaClusterSupervisor, # Start the Ecto repository Legendary.Core.Repo, # Start the Telemetry supervisor diff --git a/apps/core/mix.exs b/apps/core/mix.exs index 6107cbec..a71b29ec 100644 --- a/apps/core/mix.exs +++ b/apps/core/mix.exs @@ -120,7 +120,7 @@ defmodule Legendary.Core.MixProject do def application do [ mod: {Legendary.Core.Application, []}, - extra_applications: [:logger, :runtime_tools] + extra_applications: [:bamboo, :bamboo_smtp, :logger, :mnesia, :runtime_tools] ] end @@ -134,6 +134,7 @@ defmodule Legendary.Core.MixProject do defp deps do [ {:bamboo, "~> 1.5"}, + {:bamboo_smtp, "~> 3.0"}, {:credo, "~> 1.4", only: [:dev, :test], runtime: false}, {:ex_cldr, "~> 2.13.0"}, {:ex_doc, "~> 0.24", only: :dev, runtime: false}, @@ -153,6 +154,7 @@ defmodule Legendary.Core.MixProject do {:telemetry_poller, "~> 0.4"}, {:gettext, "~> 0.11"}, {:jason, "~> 1.0"}, + {:libcluster, "~> 3.3"}, {:plug_cowboy, "~> 2.0"}, ] end diff --git a/apps/core/test/support/empty_cluster_strategy.ex b/apps/core/test/support/empty_cluster_strategy.ex new file mode 100644 index 00000000..7cc5c124 --- /dev/null +++ b/apps/core/test/support/empty_cluster_strategy.ex @@ -0,0 +1,24 @@ +defmodule Legendary.Core.Cluster.EmptyClusterStrategy do + @moduledoc """ + A libcluster nil strategy that always returns no nodes. + """ + use GenServer + use Cluster.Strategy + + alias Cluster.Strategy.State + + def start_link([%State{} = state]) do + new_state = %State{state | :meta => []} + GenServer.start_link(__MODULE__, [new_state]) + end + + @impl true + def init([state]) do + {:ok, state, :infinity} + end + + @impl true + def handle_info(_, state) do + {:noreply, state, :infinity} + end +end diff --git a/config/config.exs b/config/config.exs index b39ed293..db9fc37c 100644 --- a/config/config.exs +++ b/config/config.exs @@ -43,7 +43,8 @@ config :core, :pow, controller_callbacks: Pow.Extension.Phoenix.ControllerCallbacks, mailer_backend: Legendary.AuthWeb.Pow.Mailer, web_mailer_module: Legendary.AuthWeb, - web_module: Legendary.AuthWeb + web_module: Legendary.AuthWeb, + cache_store_backend: Pow.Store.Backend.MnesiaCache config :core, email_from: "example@example.org" @@ -73,6 +74,8 @@ config :app, crontab: [ ] +config :mnesia, dir: to_charlist(Path.expand("./priv/mnesia")) + import_config "email_styles.exs" import_config "admin.exs" diff --git a/config/dev.exs b/config/dev.exs index 31f63c4d..6eb8bb00 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -58,6 +58,13 @@ end) config :core, Legendary.CoreMailer, adapter: Bamboo.LocalAdapter +config :libcluster, + topologies: [ + local_epmd: [ + strategy: Elixir.Cluster.Strategy.LocalEpmd + ] + ] + # ## SSL Support # # In order to use HTTPS in development, a self-signed diff --git a/config/prod.exs b/config/prod.exs index 9ab3626c..22af3f17 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -79,6 +79,20 @@ config :core, Legendary.CoreMailer, no_mx_lookups: false, auth: :always +config :core, email_from: System.get_env("EMAIL_FROM") + +config :libcluster, + topologies: [ + kubernetes: [ + strategy: Elixir.Cluster.Strategy.Kubernetes, + config: [ + mode: :ip, + kubernetes_ip_lookup_mode: :pods, + kubernetes_node_basename: System.get_env("NAME", "legendary"), + kubernetes_selector: "app=#{System.get_env("NAME", "legendary")}", + kubernetes_namespace: System.get_env("NAMESPACE", "legendary"), + polling_interval: 10_000]]] + # ## Using releases (Elixir v1.9+) # # If you are doing OTP releases, you need to instruct Phoenix diff --git a/config/test.exs b/config/test.exs index 3c082b62..06528b16 100644 --- a/config/test.exs +++ b/config/test.exs @@ -41,3 +41,10 @@ config :core, Legendary.CoreMailer, adapter: Bamboo.TestAdapter config :content, Oban, crontab: false, queues: false, plugins: false config :logger, level: :warn + +config :libcluster, + topologies: [ + # erlang_hosts: [ + # strategy: Legendary.Core.Cluster.EmptyClusterStrategy + # ] + ] diff --git a/infrastructure_templates/kube.yaml.dot b/infrastructure_templates/kube.yaml.dot index a6b79b4e..83f0442f 100644 --- a/infrastructure_templates/kube.yaml.dot +++ b/infrastructure_templates/kube.yaml.dot @@ -21,11 +21,33 @@ spec: containers: - name: app image: registry.gitlab.com/mythic-insight/legendary:{{=it.version}} + command: ["elixir"] + args: + - "--name" + - "$(NAME)@$(POD_IP)" + - "--cookie" + - "$(SECRET_KEY_BASE)" + - "-S" + - "mix" + - "phx.server" ports: - containerPort: 4000 + - containerPort: 4369 env: - name: HOSTNAME value: legendaryframework.org + - name: EMAIL_FROM + value: no-reply@legendaryframework.org + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: NAME + value: legendary-doc-site + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP - name: DATABASE_URL valueFrom: secretKeyRef: @@ -56,6 +78,21 @@ spec: secretKeyRef: name: legendary key: smtp-password + - name: SMTP_HOST + valueFrom: + secretKeyRef: + name: legendary + key: smtp-host + - name: SMTP_USERNAME + valueFrom: + secretKeyRef: + name: legendary + key: smtp-username + - name: SMTP_PASSWORD + valueFrom: + secretKeyRef: + name: legendary + key: smtp-password --- apiVersion: v1 kind: Service @@ -94,3 +131,27 @@ spec: - hosts: - legendary-demo.mythicinsight.com secretName: legendary-demo-cert +--- +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + namespace: legendary + name: pod-watcher +rules: +- apiGroups: [""] + resources: ["pods"] + verbs: ["list"] +--- +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + namespace: legendary + name: pod-watcher-binding +subjects: +- kind: ServiceAccount + namespace: legendary + name: default +roleRef: + kind: Role + name: pod-watcher + apiGroup: rbac.authorization.k8s.io diff --git a/mix.lock b/mix.lock index d5101feb..df70d3d6 100644 --- a/mix.lock +++ b/mix.lock @@ -1,5 +1,6 @@ %{ "bamboo": {:hex, :bamboo, "1.5.0", "1926107d58adba6620450f254dfe8a3686637a291851fba125686fa8574842af", [:mix], [{:hackney, ">= 1.13.0", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "d5f3d04d154e80176fd685e2531e73870d8700679f14d25a567e448abce6298d"}, + "bamboo_smtp": {:hex, :bamboo_smtp, "3.0.0", "b7f0c371af96a1cb7131908918b02abb228f9db234910bf10cf4fb177c083259", [:mix], [{:bamboo, "~> 1.2", [hex: :bamboo, repo: "hexpm", optional: false]}, {:gen_smtp, "~> 0.15.0", [hex: :gen_smtp, repo: "hexpm", optional: false]}], "hexpm", "77cb1fa3076b24109e54df622161fe1e5619376b4ecf86d8b99b46f327acc49f"}, "bcrypt_elixir": {:hex, :bcrypt_elixir, "1.1.1", "6b5560e47a02196ce5f0ab3f1d8265db79a23868c137e973b27afef928ed8006", [:make, :mix], [{:elixir_make, "~> 0.4", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "10f658be786bd2daaadcd45cc5b598da01d5bbc313da4d0e3efb2d6a511d896d"}, "bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"}, "certifi": {:hex, :certifi, "2.5.2", "b7cfeae9d2ed395695dd8201c57a2d019c0c43ecaf8b8bcb9320b40d6662f340", [:rebar3], [{:parse_trans, "~>3.3", [hex: :parse_trans, repo: "hexpm", optional: false]}], "hexpm", "3b3b5f36493004ac3455966991eaf6e768ce9884693d9968055aeeeb1e575040"}, @@ -7,9 +8,9 @@ "combine": {:hex, :combine, "0.10.0", "eff8224eeb56498a2af13011d142c5e7997a80c8f5b97c499f84c841032e429f", [:mix], [], "hexpm", "1b1dbc1790073076580d0d1d64e42eae2366583e7aecd455d1215b0d16f2451b"}, "comeonin": {:hex, :comeonin, "4.1.2", "3eb5620fd8e35508991664b4c2b04dd41e52f1620b36957be837c1d7784b7592", [:mix], [{:argon2_elixir, "~> 1.2", [hex: :argon2_elixir, repo: "hexpm", optional: true]}, {:bcrypt_elixir, "~> 0.12.1 or ~> 1.0", [hex: :bcrypt_elixir, repo: "hexpm", optional: true]}, {:pbkdf2_elixir, "~> 0.12", [hex: :pbkdf2_elixir, repo: "hexpm", optional: true]}], "hexpm", "d8700a0ca4dbb616c22c9b3f6dd539d88deaafec3efe66869d6370c9a559b3e9"}, "connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb30e6625b04a6117c1b2db6ace7d5976", [:mix], [], "hexpm", "4a0850c9be22a43af9920a71ab17c051f5f7d45c209e40269a1938832510e4d9"}, - "cowboy": {:hex, :cowboy, "2.8.0", "f3dc62e35797ecd9ac1b50db74611193c29815401e53bac9a5c0577bd7bc667d", [:rebar3], [{:cowlib, "~> 2.9.1", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "~> 1.7.1", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "4643e4fba74ac96d4d152c75803de6fad0b3fa5df354c71afdd6cbeeb15fac8a"}, + "cowboy": {:hex, :cowboy, "2.9.0", "865dd8b6607e14cf03282e10e934023a1bd8be6f6bacf921a7e2a96d800cd452", [:make, :rebar3], [{:cowlib, "2.11.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "2c729f934b4e1aa149aff882f57c6372c15399a20d54f65c8d67bef583021bde"}, "cowboy_telemetry": {:hex, :cowboy_telemetry, "0.3.1", "ebd1a1d7aff97f27c66654e78ece187abdc646992714164380d8a041eda16754", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "3a6efd3366130eab84ca372cbd4a7d3c3a97bdfcfb4911233b035d117063f0af"}, - "cowlib": {:hex, :cowlib, "2.9.1", "61a6c7c50cf07fdd24b2f45b89500bb93b6686579b069a89f88cb211e1125c78", [:rebar3], [], "hexpm", "e4175dc240a70d996156160891e1c62238ede1729e45740bdd38064dad476170"}, + "cowlib": {:hex, :cowlib, "2.11.0", "0b9ff9c346629256c42ebe1eeb769a83c6cb771a6ee5960bd110ab0b9b872063", [:make, :rebar3], [], "hexpm", "2b3e9da0b21c4565751a6d4901c20d1b4cc25cbb7fd50d91d2ab6dd287bc86a9"}, "credo": {:hex, :credo, "1.4.0", "92339d4cbadd1e88b5ee43d427b639b68a11071b6f73854e33638e30a0ea11f5", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "1fd3b70dce216574ce3c18bdf510b57e7c4c85c2ec9cad4bff854abaf7e58658"}, "crontab": {:hex, :crontab, "1.1.10", "dc9bb1f4299138d47bce38341f5dcbee0aa6c205e864fba7bc847f3b5cb48241", [:mix], [{:ecto, "~> 1.0 or ~> 2.0 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}], "hexpm", "1347d889d1a0eda997990876b4894359e34bfbbd688acbb0ba28a2795ca40685"}, "db_connection": {:hex, :db_connection, "2.2.2", "3bbca41b199e1598245b716248964926303b5d4609ff065125ce98bcd368939e", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, repo: "hexpm", optional: false]}], "hexpm", "642af240d8a8affb93b4ba5a6fcd2bbcbdc327e1a524b825d383711536f8070c"}, @@ -27,6 +28,7 @@ "excoveralls": {:hex, :excoveralls, "0.13.0", "4e1b7cc4e0351d8d16e9be21b0345a7e165798ee5319c7800b9138ce17e0b38e", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "fe2a56c8909564e2e6764765878d7d5e141f2af3bc8ff3b018a68ee2a218fced"}, "file_system": {:hex, :file_system, "0.2.8", "f632bd287927a1eed2b718f22af727c5aeaccc9a98d8c2bd7bff709e851dc986", [:mix], [], "hexpm", "97a3b6f8d63ef53bd0113070102db2ce05352ecf0d25390eb8d747c2bde98bca"}, "floki": {:hex, :floki, "0.25.0", "b1c9ddf5f32a3a90b43b76f3386ca054325dc2478af020e87b5111c19f2284ac", [:mix], [{:html_entities, "~> 0.5.0", [hex: :html_entities, repo: "hexpm", optional: false]}], "hexpm", "631f4e627c46d5ecd347df5a2accdaf0621c77c3693c5b75a8ad58e84c61f242"}, + "gen_smtp": {:hex, :gen_smtp, "0.15.0", "9f51960c17769b26833b50df0b96123605a8024738b62db747fece14eb2fbfcc", [:rebar3], [], "hexpm", "29bd14a88030980849c7ed2447b8db6d6c9278a28b11a44cafe41b791205440f"}, "gen_stage": {:hex, :gen_stage, "1.0.0", "51c8ae56ff54f9a2a604ca583798c210ad245f415115453b773b621c49776df5", [:mix], [], "hexpm", "1d9fc978db5305ac54e6f5fec7adf80cd893b1000cf78271564c516aa2af7706"}, "gen_state_machine": {:hex, :gen_state_machine, "2.1.0", "a38b0e53fad812d29ec149f0d354da5d1bc0d7222c3711f3a0bd5aa608b42992", [:mix], [], "hexpm", "ae367038808db25cee2f2c4b8d0531522ea587c4995eb6f96ee73410a60fa06b"}, "gettext": {:hex, :gettext, "0.18.2", "7df3ea191bb56c0309c00a783334b288d08a879f53a7014341284635850a6e55", [:mix], [], "hexpm", "f9f537b13d4fdd30f3039d33cb80144c3aa1f8d9698e47d7bcbcc8df93b1f5c5"}, @@ -36,6 +38,7 @@ "idna": {:hex, :idna, "6.0.1", "1d038fb2e7668ce41fbf681d2c45902e52b3cb9e9c77b55334353b222c2ee50c", [:rebar3], [{:unicode_util_compat, "0.5.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "a02c8a1c4fd601215bb0b0324c8a6986749f807ce35f25449ec9e69758708122"}, "jason": {:hex, :jason, "1.2.2", "ba43e3f2709fd1aa1dce90aaabfd039d000469c05c56f0b8e31978e03fa39052", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "18a228f5f0058ee183f29f9eae0805c6e59d61c3b006760668d8d18ff0d12179"}, "kaffy": {:hex, :kaffy, "0.9.0", "bef34c9729f6a3af4d0dea8eede8bcb9e11371a83ac9a8b393991bce81839517", [:mix], [{:ecto, "~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.11", [hex: :phoenix_html, repo: "hexpm", optional: false]}], "hexpm", "d18ff57b8e68feb433aed11e71510cd357abc7034e75358af5deff7d0d4c6ed3"}, + "libcluster": {:hex, :libcluster, "3.3.0", "f7d45ff56d88e9fb4c30aee662480cbab69ebc0e7f7da4ad8d01b1e4f7492da8", [:mix], [{:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "ecdcdc88334ec8eb18b10a13a1d5f22a3319a970b5b1e66cfe71c7719a4ab6cc"}, "libring": {:hex, :libring, "1.5.0", "44313eb6862f5c9168594a061e9d5f556a9819da7c6444706a9e2da533396d70", [:mix], [], "hexpm", "04e843d4fdcff49a62d8e03778d17c6cb2a03fe2d14020d3825a1761b55bd6cc"}, "linguist": {:hex, :linguist, "0.3.1", "8ce81114691be8ef4a122e7f57bd1842bc96b1f5650b66b246d7035238cab69d", [:mix], [{:ex_cldr, "~> 2.0", [hex: :ex_cldr, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:yaml_elixir, "~> 2.0", [hex: :yaml_elixir, repo: "hexpm", optional: false]}], "hexpm", "5b06f97912e298f60dd00bc6a588b1fe1ec8838b268e4fdbf4443a25511f0614"}, "makeup": {:hex, :makeup, "1.0.5", "d5a830bc42c9800ce07dd97fa94669dfb93d3bf5fcf6ea7a0c67b2e0e4a7f26c", [:mix], [{:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "cfa158c02d3f5c0c665d0af11512fed3fba0144cf1aadee0f2ce17747fba2ca9"}, @@ -51,7 +54,7 @@ "nimble_parsec": {:hex, :nimble_parsec, "1.1.0", "3a6fca1550363552e54c216debb6a9e95bd8d32348938e13de5eda962c0d7f89", [:mix], [], "hexpm", "08eb32d66b706e913ff748f11694b17981c0b04a33ef470e33e11b3d3ac8f54b"}, "oban": {:hex, :oban, "2.1.0", "034144686f7e76a102b5d67731f098d98a9e4a52b07c25ad580a01f83a7f1cf5", [:mix], [{:ecto_sql, ">= 3.4.3", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.14", [hex: :postgrex, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c6f067fa3b308ed9e0e6beb2b34277c9c4e48bf95338edabd8f4a757a26e04c2"}, "parse_trans": {:hex, :parse_trans, "3.3.0", "09765507a3c7590a784615cfd421d101aec25098d50b89d7aa1d66646bc571c1", [:rebar3], [], "hexpm", "17ef63abde837ad30680ea7f857dd9e7ced9476cdd7b0394432af4bfc241b960"}, - "phoenix": {:hex, :phoenix, "1.5.8", "71cfa7a9bb9a37af4df98939790642f210e35f696b935ca6d9d9c55a884621a4", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_html, "~> 2.13", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:plug, "~> 1.10", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 1.0 or ~> 2.2", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.1.2 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "35ded0a32f4836168c7ab6c33b88822eccd201bcd9492125a9bea4c54332d955"}, + "phoenix": {:hex, :phoenix, "1.5.9", "a6368d36cfd59d917b37c44386e01315bc89f7609a10a45a22f47c007edf2597", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_html, "~> 2.13 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:plug, "~> 1.10", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 1.0 or ~> 2.2", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.1.2 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7e4bce20a67c012f1fbb0af90e5da49fa7bf0d34e3a067795703b74aef75427d"}, "phoenix_ecto": {:hex, :phoenix_ecto, "4.1.0", "a044d0756d0464c5a541b4a0bf4bcaf89bffcaf92468862408290682c73ae50d", [:mix], [{:ecto, "~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.9", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "c5e666a341ff104d0399d8f0e4ff094559b2fde13a5985d4cb5023b2c2ac558b"}, "phoenix_html": {:hex, :phoenix_html, "2.14.3", "51f720d0d543e4e157ff06b65de38e13303d5778a7919bcc696599e5934271b8", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "efd697a7fff35a13eeeb6b43db884705cba353a1a41d127d118fda5f90c8e80f"}, "phoenix_html_sanitizer": {:hex, :phoenix_html_sanitizer, "1.0.2", "e2c8cfbc83660e362753de127cc957bec3442a8aecdf271fb65a684a906fccf5", [:mix], [{:html_sanitize_ex, "~> 1.0.0", [hex: :html_sanitize_ex, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}], "hexpm", "47aebb08fa954b7ad95f295fb701df9800ee3a489212119c9c6074a65e1e5a10"}, @@ -66,7 +69,7 @@ "postgrex": {:hex, :postgrex, "0.15.5", "aec40306a622d459b01bff890fa42f1430dac61593b122754144ad9033a2152f", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "ed90c81e1525f65a2ba2279dbcebf030d6d13328daa2f8088b9661eb9143af7f"}, "pow": {:hex, :pow, "1.0.20", "b99993811af5233681bfc521e81ca706d25a56f2be54bad6424db327ce840ab9", [:mix], [{:ecto, "~> 2.2 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix, ">= 1.3.0 and < 1.6.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, ">= 2.0.0 and <= 3.0.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:plug, ">= 1.5.0 and < 2.0.0", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "4b6bd271399ccb353abbdbdc316199fe7fd7ae36bbf47059d53e366831c34fc8"}, "quantum": {:hex, :quantum, "2.4.0", "f2ad4b20988f848455d35ed0e884ba0c7629a27ee86cbec6a6e0fc214b6e69cf", [:mix], [{:calendar, "~> 0.17", [hex: :calendar, repo: "hexpm", optional: true]}, {:crontab, "~> 1.1", [hex: :crontab, repo: "hexpm", optional: false]}, {:gen_stage, "~> 0.12 or ~> 1.0", [hex: :gen_stage, repo: "hexpm", optional: false]}, {:swarm, "~> 3.3", [hex: :swarm, repo: "hexpm", optional: false]}, {:timex, "~> 3.1", [hex: :timex, repo: "hexpm", optional: true]}, {:tzdata, "~> 1.0", [hex: :tzdata, repo: "hexpm", optional: true]}], "hexpm", "a125a9e65a5af740a1198f3b05c1a736fce3942f5e0dc2901e0f9be5745bea99"}, - "ranch": {:hex, :ranch, "1.7.1", "6b1fab51b49196860b733a49c07604465a47bdb78aa10c1c16a3d199f7f8c881", [:rebar3], [], "hexpm", "451d8527787df716d99dc36162fca05934915db0b6141bbdac2ea8d3c7afc7d7"}, + "ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"}, "sitemap": {:hex, :sitemap, "1.1.0", "23a019cccef7c17090d0b493354ee47a94549db64fd1cf39bda7eb41c567729c", [:mix], [{:xml_builder, ">= 0.0.0", [hex: :xml_builder, repo: "hexpm", optional: false]}], "hexpm", "d21f2c3ac65567fbdbe231f9faaf802a48405aa487d24052964d3d818a3d8c22"}, "slugger": {:hex, :slugger, "0.3.0", "efc667ab99eee19a48913ccf3d038b1fb9f165fa4fbf093be898b8099e61b6ed", [:mix], [], "hexpm", "20d0ded0e712605d1eae6c5b4889581c3460d92623a930ddda91e0e609b5afba"}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.6", "cf344f5692c82d2cd7554f5ec8fd961548d4fd09e7d22f5b62482e5aeaebd4b0", [:make, :mix, :rebar3], [], "hexpm", "bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680"}, From 6207e2de9caa327ac71623f790a78052952ea503 Mon Sep 17 00:00:00 2001 From: Robert Prehn Date: Fri, 28 May 2021 17:54:20 +0000 Subject: [PATCH 02/12] chore(release): 2.4.2 [skip ci] --- apps/admin/mix.exs | 2 +- apps/content/mix.exs | 2 +- apps/core/mix.exs | 2 +- infrastructure/kube.yaml | 80 +++++++++++++++++++++++++++++++++++++++- mix.exs | 2 +- package.json | 2 +- 6 files changed, 84 insertions(+), 6 deletions(-) diff --git a/apps/admin/mix.exs b/apps/admin/mix.exs index db36afb7..4629ea23 100644 --- a/apps/admin/mix.exs +++ b/apps/admin/mix.exs @@ -1,7 +1,7 @@ defmodule Legendary.Admin.MixProject do use Mix.Project - @version "2.4.1" + @version "2.4.2" def project do [ diff --git a/apps/content/mix.exs b/apps/content/mix.exs index 5391e2ab..d09a4104 100644 --- a/apps/content/mix.exs +++ b/apps/content/mix.exs @@ -1,7 +1,7 @@ defmodule Legendary.Content.MixProject do use Mix.Project - @version "2.4.1" + @version "2.4.2" def project do [ diff --git a/apps/core/mix.exs b/apps/core/mix.exs index a71b29ec..62c8dc03 100644 --- a/apps/core/mix.exs +++ b/apps/core/mix.exs @@ -1,7 +1,7 @@ defmodule Legendary.Core.MixProject do use Mix.Project - @version "2.4.1" + @version "2.4.2" def project do [ diff --git a/infrastructure/kube.yaml b/infrastructure/kube.yaml index eae2df04..9d606fbe 100644 --- a/infrastructure/kube.yaml +++ b/infrastructure/kube.yaml @@ -20,10 +20,34 @@ spec: spec: containers: - name: app - image: registry.gitlab.com/mythic-insight/legendary:2.4.1 + image: registry.gitlab.com/mythic-insight/legendary:2.4.2 + command: ["elixir"] + args: + - "--name" + - "$(NAME)@$(POD_IP)" + - "--cookie" + - "$(SECRET_KEY_BASE)" + - "-S" + - "mix" + - "phx.server" ports: - containerPort: 4000 + - containerPort: 4369 env: + - name: HOSTNAME + value: legendaryframework.org + - name: EMAIL_FROM + value: no-reply@legendaryframework.org + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: NAME + value: legendary-doc-site + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP - name: DATABASE_URL valueFrom: secretKeyRef: @@ -39,6 +63,36 @@ spec: secretKeyRef: name: legendary key: live-view-signing-salt + - name: SMTP_HOST + valueFrom: + secretKeyRef: + name: legendary + key: smtp-host + - name: SMTP_USERNAME + valueFrom: + secretKeyRef: + name: legendary + key: smtp-username + - name: SMTP_PASSWORD + valueFrom: + secretKeyRef: + name: legendary + key: smtp-password + - name: SMTP_HOST + valueFrom: + secretKeyRef: + name: legendary + key: smtp-host + - name: SMTP_USERNAME + valueFrom: + secretKeyRef: + name: legendary + key: smtp-username + - name: SMTP_PASSWORD + valueFrom: + secretKeyRef: + name: legendary + key: smtp-password --- apiVersion: v1 kind: Service @@ -77,3 +131,27 @@ spec: - hosts: - legendary-demo.mythicinsight.com secretName: legendary-demo-cert +--- +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + namespace: legendary + name: pod-watcher +rules: +- apiGroups: [""] + resources: ["pods"] + verbs: ["list"] +--- +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + namespace: legendary + name: pod-watcher-binding +subjects: +- kind: ServiceAccount + namespace: legendary + name: default +roleRef: + kind: Role + name: pod-watcher + apiGroup: rbac.authorization.k8s.io diff --git a/mix.exs b/mix.exs index 30fd416c..65879d00 100644 --- a/mix.exs +++ b/mix.exs @@ -1,7 +1,7 @@ defmodule Legendary.Mixfile do use Mix.Project - @version "2.4.1" + @version "2.4.2" def project do [ diff --git a/package.json b/package.json index 1aa2f2b0..13a6293a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mythic-insight/legendary", - "version": "2.4.1", + "version": "2.4.2", "private": true, "description": "The Legendary Phoenix Boilerplate.", "main": "index.js", From 10255dde42ed9882b4a4762264e6f0bfd7025db2 Mon Sep 17 00:00:00 2001 From: Robert Prehn <3952444+prehnRA@users.noreply.github.com> Date: Fri, 28 May 2021 15:36:05 -0500 Subject: [PATCH 03/12] fix: Default to ErlangHosts cluster strategy for clustering in dev --- config/dev.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/dev.exs b/config/dev.exs index 6eb8bb00..0fa7ceb1 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -60,8 +60,8 @@ config :core, Legendary.CoreMailer, adapter: Bamboo.LocalAdapter config :libcluster, topologies: [ - local_epmd: [ - strategy: Elixir.Cluster.Strategy.LocalEpmd + erlang_hosts: [ + strategy: Elixir.Cluster.Strategy.ErlangHosts, ] ] From fb2dc24dd58d4f5d08adae3c99dbe10c55749cb6 Mon Sep 17 00:00:00 2001 From: Robert Prehn Date: Fri, 28 May 2021 20:48:12 +0000 Subject: [PATCH 04/12] chore(release): 2.4.3 [skip ci] --- apps/admin/mix.exs | 2 +- apps/content/mix.exs | 2 +- apps/core/mix.exs | 2 +- infrastructure/kube.yaml | 2 +- mix.exs | 2 +- package.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/admin/mix.exs b/apps/admin/mix.exs index 4629ea23..41f8ddba 100644 --- a/apps/admin/mix.exs +++ b/apps/admin/mix.exs @@ -1,7 +1,7 @@ defmodule Legendary.Admin.MixProject do use Mix.Project - @version "2.4.2" + @version "2.4.3" def project do [ diff --git a/apps/content/mix.exs b/apps/content/mix.exs index d09a4104..d3fe7b7a 100644 --- a/apps/content/mix.exs +++ b/apps/content/mix.exs @@ -1,7 +1,7 @@ defmodule Legendary.Content.MixProject do use Mix.Project - @version "2.4.2" + @version "2.4.3" def project do [ diff --git a/apps/core/mix.exs b/apps/core/mix.exs index 62c8dc03..db74aa44 100644 --- a/apps/core/mix.exs +++ b/apps/core/mix.exs @@ -1,7 +1,7 @@ defmodule Legendary.Core.MixProject do use Mix.Project - @version "2.4.2" + @version "2.4.3" def project do [ diff --git a/infrastructure/kube.yaml b/infrastructure/kube.yaml index 9d606fbe..61b07f44 100644 --- a/infrastructure/kube.yaml +++ b/infrastructure/kube.yaml @@ -20,7 +20,7 @@ spec: spec: containers: - name: app - image: registry.gitlab.com/mythic-insight/legendary:2.4.2 + image: registry.gitlab.com/mythic-insight/legendary:2.4.3 command: ["elixir"] args: - "--name" diff --git a/mix.exs b/mix.exs index 65879d00..9739076f 100644 --- a/mix.exs +++ b/mix.exs @@ -1,7 +1,7 @@ defmodule Legendary.Mixfile do use Mix.Project - @version "2.4.2" + @version "2.4.3" def project do [ diff --git a/package.json b/package.json index 13a6293a..07ad91e1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mythic-insight/legendary", - "version": "2.4.2", + "version": "2.4.3", "private": true, "description": "The Legendary Phoenix Boilerplate.", "main": "index.js", From 8467703484de02594d2b12b0d7b391e7b606a8cf Mon Sep 17 00:00:00 2001 From: Robert Prehn <3952444+prehnRA@users.noreply.github.com> Date: Tue, 1 Jun 2021 12:10:57 -0500 Subject: [PATCH 05/12] fix: Provide empty priv directory for mnesia startup --- priv/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 priv/.keep diff --git a/priv/.keep b/priv/.keep new file mode 100644 index 00000000..e69de29b From 538364eae3a190148da809cb952b1da3015de4da Mon Sep 17 00:00:00 2001 From: Robert Prehn Date: Tue, 1 Jun 2021 17:23:57 +0000 Subject: [PATCH 06/12] chore(release): 2.4.4 [skip ci] --- apps/admin/mix.exs | 2 +- apps/content/mix.exs | 2 +- apps/core/mix.exs | 2 +- infrastructure/kube.yaml | 2 +- mix.exs | 2 +- package.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/admin/mix.exs b/apps/admin/mix.exs index 41f8ddba..e0b2d447 100644 --- a/apps/admin/mix.exs +++ b/apps/admin/mix.exs @@ -1,7 +1,7 @@ defmodule Legendary.Admin.MixProject do use Mix.Project - @version "2.4.3" + @version "2.4.4" def project do [ diff --git a/apps/content/mix.exs b/apps/content/mix.exs index d3fe7b7a..2c371925 100644 --- a/apps/content/mix.exs +++ b/apps/content/mix.exs @@ -1,7 +1,7 @@ defmodule Legendary.Content.MixProject do use Mix.Project - @version "2.4.3" + @version "2.4.4" def project do [ diff --git a/apps/core/mix.exs b/apps/core/mix.exs index db74aa44..da91f75c 100644 --- a/apps/core/mix.exs +++ b/apps/core/mix.exs @@ -1,7 +1,7 @@ defmodule Legendary.Core.MixProject do use Mix.Project - @version "2.4.3" + @version "2.4.4" def project do [ diff --git a/infrastructure/kube.yaml b/infrastructure/kube.yaml index 61b07f44..932b0fb7 100644 --- a/infrastructure/kube.yaml +++ b/infrastructure/kube.yaml @@ -20,7 +20,7 @@ spec: spec: containers: - name: app - image: registry.gitlab.com/mythic-insight/legendary:2.4.3 + image: registry.gitlab.com/mythic-insight/legendary:2.4.4 command: ["elixir"] args: - "--name" diff --git a/mix.exs b/mix.exs index 9739076f..ca827f61 100644 --- a/mix.exs +++ b/mix.exs @@ -1,7 +1,7 @@ defmodule Legendary.Mixfile do use Mix.Project - @version "2.4.3" + @version "2.4.4" def project do [ diff --git a/package.json b/package.json index 07ad91e1..6a09ca07 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mythic-insight/legendary", - "version": "2.4.3", + "version": "2.4.4", "private": true, "description": "The Legendary Phoenix Boilerplate.", "main": "index.js", From f1f6e40b3b6f029300215d23c4e4b1786914d274 Mon Sep 17 00:00:00 2001 From: Robert Prehn <3952444+prehnRA@users.noreply.github.com> Date: Thu, 3 Jun 2021 13:31:12 -0500 Subject: [PATCH 07/12] fix: Convert locale name to atom to pass type check in Linguist --- apps/core/lib/i18n.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/core/lib/i18n.ex b/apps/core/lib/i18n.ex index 48067edc..5ec34367 100644 --- a/apps/core/lib/i18n.ex +++ b/apps/core/lib/i18n.ex @@ -12,6 +12,7 @@ defmodule Legendary.I18n do path |> Path.basename() |> Path.rootname() + |> String.to_atom() locale locale, path end) From 063c8ab601b58970ccf303297a385f542bc624dc Mon Sep 17 00:00:00 2001 From: Robert Prehn Date: Thu, 3 Jun 2021 18:48:16 +0000 Subject: [PATCH 08/12] chore(release): 2.4.5 [skip ci] --- apps/admin/mix.exs | 2 +- apps/content/mix.exs | 2 +- apps/core/mix.exs | 2 +- infrastructure/kube.yaml | 2 +- mix.exs | 2 +- package.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/admin/mix.exs b/apps/admin/mix.exs index e0b2d447..cb29ceac 100644 --- a/apps/admin/mix.exs +++ b/apps/admin/mix.exs @@ -1,7 +1,7 @@ defmodule Legendary.Admin.MixProject do use Mix.Project - @version "2.4.4" + @version "2.4.5" def project do [ diff --git a/apps/content/mix.exs b/apps/content/mix.exs index 2c371925..92c993b4 100644 --- a/apps/content/mix.exs +++ b/apps/content/mix.exs @@ -1,7 +1,7 @@ defmodule Legendary.Content.MixProject do use Mix.Project - @version "2.4.4" + @version "2.4.5" def project do [ diff --git a/apps/core/mix.exs b/apps/core/mix.exs index da91f75c..330eec7b 100644 --- a/apps/core/mix.exs +++ b/apps/core/mix.exs @@ -1,7 +1,7 @@ defmodule Legendary.Core.MixProject do use Mix.Project - @version "2.4.4" + @version "2.4.5" def project do [ diff --git a/infrastructure/kube.yaml b/infrastructure/kube.yaml index 932b0fb7..93953eff 100644 --- a/infrastructure/kube.yaml +++ b/infrastructure/kube.yaml @@ -20,7 +20,7 @@ spec: spec: containers: - name: app - image: registry.gitlab.com/mythic-insight/legendary:2.4.4 + image: registry.gitlab.com/mythic-insight/legendary:2.4.5 command: ["elixir"] args: - "--name" diff --git a/mix.exs b/mix.exs index ca827f61..8a3a3e66 100644 --- a/mix.exs +++ b/mix.exs @@ -1,7 +1,7 @@ defmodule Legendary.Mixfile do use Mix.Project - @version "2.4.4" + @version "2.4.5" def project do [ diff --git a/package.json b/package.json index 6a09ca07..070757a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mythic-insight/legendary", - "version": "2.4.4", + "version": "2.4.5", "private": true, "description": "The Legendary Phoenix Boilerplate.", "main": "index.js", From 3400d9eb8817db8e78b673fd8748ba0b436c1d7b Mon Sep 17 00:00:00 2001 From: Robert Prehn <3952444+prehnRA@users.noreply.github.com> Date: Thu, 3 Jun 2021 14:26:28 -0500 Subject: [PATCH 09/12] fix: Update pow so we can support OTP 24 --- apps/core/mix.exs | 2 +- mix.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/core/mix.exs b/apps/core/mix.exs index 330eec7b..db4aeaad 100644 --- a/apps/core/mix.exs +++ b/apps/core/mix.exs @@ -149,7 +149,7 @@ defmodule Legendary.Core.MixProject do {:phoenix_live_reload, "~> 1.2", only: :dev}, {:phoenix_live_dashboard, "~> 0.2.0"}, {:phoenix_pubsub, "~> 2.0"}, - {:pow, "~> 1.0.20"}, + {:pow, "~> 1.0.23"}, {:telemetry_metrics, "~> 0.4"}, {:telemetry_poller, "~> 0.4"}, {:gettext, "~> 0.11"}, diff --git a/mix.lock b/mix.lock index df70d3d6..61e25b90 100644 --- a/mix.lock +++ b/mix.lock @@ -67,7 +67,7 @@ "plug_cowboy": {:hex, :plug_cowboy, "2.5.0", "51c998f788c4e68fc9f947a5eba8c215fbb1d63a520f7604134cab0270ea6513", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "5b2c8925a5e2587446f33810a58c01e66b3c345652eeec809b76ba007acde71a"}, "plug_crypto": {:hex, :plug_crypto, "1.2.2", "05654514ac717ff3a1843204b424477d9e60c143406aa94daf2274fdd280794d", [:mix], [], "hexpm", "87631c7ad914a5a445f0a3809f99b079113ae4ed4b867348dd9eec288cecb6db"}, "postgrex": {:hex, :postgrex, "0.15.5", "aec40306a622d459b01bff890fa42f1430dac61593b122754144ad9033a2152f", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "ed90c81e1525f65a2ba2279dbcebf030d6d13328daa2f8088b9661eb9143af7f"}, - "pow": {:hex, :pow, "1.0.20", "b99993811af5233681bfc521e81ca706d25a56f2be54bad6424db327ce840ab9", [:mix], [{:ecto, "~> 2.2 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix, ">= 1.3.0 and < 1.6.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, ">= 2.0.0 and <= 3.0.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:plug, ">= 1.5.0 and < 2.0.0", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "4b6bd271399ccb353abbdbdc316199fe7fd7ae36bbf47059d53e366831c34fc8"}, + "pow": {:hex, :pow, "1.0.24", "d834f5ce40c9b15a810a942de6492314e0defa157b6503e63775014b165a9c10", [:mix], [{:ecto, "~> 2.2 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix, ">= 1.3.0 and < 1.6.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, ">= 2.0.0 and <= 3.0.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:plug, ">= 1.5.0 and < 2.0.0", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "70fe212f2b9a362a73e317cb33f506dbebd5d3bbfd3f64883898e77cc29ea9e5"}, "quantum": {:hex, :quantum, "2.4.0", "f2ad4b20988f848455d35ed0e884ba0c7629a27ee86cbec6a6e0fc214b6e69cf", [:mix], [{:calendar, "~> 0.17", [hex: :calendar, repo: "hexpm", optional: true]}, {:crontab, "~> 1.1", [hex: :crontab, repo: "hexpm", optional: false]}, {:gen_stage, "~> 0.12 or ~> 1.0", [hex: :gen_stage, repo: "hexpm", optional: false]}, {:swarm, "~> 3.3", [hex: :swarm, repo: "hexpm", optional: false]}, {:timex, "~> 3.1", [hex: :timex, repo: "hexpm", optional: true]}, {:tzdata, "~> 1.0", [hex: :tzdata, repo: "hexpm", optional: true]}], "hexpm", "a125a9e65a5af740a1198f3b05c1a736fce3942f5e0dc2901e0f9be5745bea99"}, "ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"}, "sitemap": {:hex, :sitemap, "1.1.0", "23a019cccef7c17090d0b493354ee47a94549db64fd1cf39bda7eb41c567729c", [:mix], [{:xml_builder, ">= 0.0.0", [hex: :xml_builder, repo: "hexpm", optional: false]}], "hexpm", "d21f2c3ac65567fbdbe231f9faaf802a48405aa487d24052964d3d818a3d8c22"}, From 9fa40ca392eeefc30b5f2516330cc023f8155bad Mon Sep 17 00:00:00 2001 From: Robert Prehn Date: Thu, 3 Jun 2021 19:49:36 +0000 Subject: [PATCH 10/12] chore(release): 2.4.6 [skip ci] --- apps/admin/mix.exs | 2 +- apps/content/mix.exs | 2 +- apps/core/mix.exs | 2 +- infrastructure/kube.yaml | 2 +- mix.exs | 2 +- package.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/admin/mix.exs b/apps/admin/mix.exs index cb29ceac..fd5378d1 100644 --- a/apps/admin/mix.exs +++ b/apps/admin/mix.exs @@ -1,7 +1,7 @@ defmodule Legendary.Admin.MixProject do use Mix.Project - @version "2.4.5" + @version "2.4.6" def project do [ diff --git a/apps/content/mix.exs b/apps/content/mix.exs index 92c993b4..ae91de82 100644 --- a/apps/content/mix.exs +++ b/apps/content/mix.exs @@ -1,7 +1,7 @@ defmodule Legendary.Content.MixProject do use Mix.Project - @version "2.4.5" + @version "2.4.6" def project do [ diff --git a/apps/core/mix.exs b/apps/core/mix.exs index db4aeaad..12c286a7 100644 --- a/apps/core/mix.exs +++ b/apps/core/mix.exs @@ -1,7 +1,7 @@ defmodule Legendary.Core.MixProject do use Mix.Project - @version "2.4.5" + @version "2.4.6" def project do [ diff --git a/infrastructure/kube.yaml b/infrastructure/kube.yaml index 93953eff..3792e32b 100644 --- a/infrastructure/kube.yaml +++ b/infrastructure/kube.yaml @@ -20,7 +20,7 @@ spec: spec: containers: - name: app - image: registry.gitlab.com/mythic-insight/legendary:2.4.5 + image: registry.gitlab.com/mythic-insight/legendary:2.4.6 command: ["elixir"] args: - "--name" diff --git a/mix.exs b/mix.exs index 8a3a3e66..e71490a6 100644 --- a/mix.exs +++ b/mix.exs @@ -1,7 +1,7 @@ defmodule Legendary.Mixfile do use Mix.Project - @version "2.4.5" + @version "2.4.6" def project do [ diff --git a/package.json b/package.json index 070757a9..4aa20b4b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mythic-insight/legendary", - "version": "2.4.5", + "version": "2.4.6", "private": true, "description": "The Legendary Phoenix Boilerplate.", "main": "index.js", From d1efa7942a7477d9e03b499933b4d13585359a51 Mon Sep 17 00:00:00 2001 From: Robert Prehn <3952444+prehnRA@users.noreply.github.com> Date: Thu, 10 Jun 2021 12:45:09 -0500 Subject: [PATCH 11/12] fix: Do not use realpath in update / bootstrap scripts --- script/console | 5 ++--- script/server | 3 +-- script/test | 3 +-- script/update | 3 +-- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/script/console b/script/console index 28711888..ffe2c704 100755 --- a/script/console +++ b/script/console @@ -3,9 +3,8 @@ set -x set -e -FULL_PATH=$(realpath $0) -DIR_PATH=$(dirname $FULL_PATH) +DIR_PATH=$(dirname $0) $DIR_PATH/update -iex -S mix \ No newline at end of file +iex -S mix diff --git a/script/server b/script/server index 66d85385..9dea5283 100755 --- a/script/server +++ b/script/server @@ -3,8 +3,7 @@ set -x set -e -FULL_PATH=$(realpath $0) -DIR_PATH=$(dirname $FULL_PATH) +DIR_PATH=$(dirname $0) $DIR_PATH/update diff --git a/script/test b/script/test index 7ad18596..fb456593 100755 --- a/script/test +++ b/script/test @@ -3,8 +3,7 @@ set -x set -e -FULL_PATH=$(realpath $0) -DIR_PATH=$(dirname $FULL_PATH) +DIR_PATH=$(dirname $0) $DIR_PATH/bootstrap diff --git a/script/update b/script/update index 6771deb1..1e92daf3 100755 --- a/script/update +++ b/script/update @@ -3,8 +3,7 @@ set -x set -e -FULL_PATH=$(realpath $0) -DIR_PATH=$(dirname $FULL_PATH) +DIR_PATH=$(dirname $0) $DIR_PATH/bootstrap From ac58b31b069916bf8da782141c8aa690c859b5a9 Mon Sep 17 00:00:00 2001 From: Robert Prehn Date: Thu, 10 Jun 2021 18:01:33 +0000 Subject: [PATCH 12/12] chore(release): 2.4.7 [skip ci] --- apps/admin/mix.exs | 2 +- apps/content/mix.exs | 2 +- apps/core/mix.exs | 2 +- infrastructure/kube.yaml | 2 +- mix.exs | 2 +- package.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/admin/mix.exs b/apps/admin/mix.exs index fd5378d1..82689030 100644 --- a/apps/admin/mix.exs +++ b/apps/admin/mix.exs @@ -1,7 +1,7 @@ defmodule Legendary.Admin.MixProject do use Mix.Project - @version "2.4.6" + @version "2.4.7" def project do [ diff --git a/apps/content/mix.exs b/apps/content/mix.exs index ae91de82..2775e82c 100644 --- a/apps/content/mix.exs +++ b/apps/content/mix.exs @@ -1,7 +1,7 @@ defmodule Legendary.Content.MixProject do use Mix.Project - @version "2.4.6" + @version "2.4.7" def project do [ diff --git a/apps/core/mix.exs b/apps/core/mix.exs index 12c286a7..939cb3dd 100644 --- a/apps/core/mix.exs +++ b/apps/core/mix.exs @@ -1,7 +1,7 @@ defmodule Legendary.Core.MixProject do use Mix.Project - @version "2.4.6" + @version "2.4.7" def project do [ diff --git a/infrastructure/kube.yaml b/infrastructure/kube.yaml index 3792e32b..4f7d4aaf 100644 --- a/infrastructure/kube.yaml +++ b/infrastructure/kube.yaml @@ -20,7 +20,7 @@ spec: spec: containers: - name: app - image: registry.gitlab.com/mythic-insight/legendary:2.4.6 + image: registry.gitlab.com/mythic-insight/legendary:2.4.7 command: ["elixir"] args: - "--name" diff --git a/mix.exs b/mix.exs index e71490a6..5ec19141 100644 --- a/mix.exs +++ b/mix.exs @@ -1,7 +1,7 @@ defmodule Legendary.Mixfile do use Mix.Project - @version "2.4.6" + @version "2.4.7" def project do [ diff --git a/package.json b/package.json index 4aa20b4b..c754218a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mythic-insight/legendary", - "version": "2.4.6", + "version": "2.4.7", "private": true, "description": "The Legendary Phoenix Boilerplate.", "main": "index.js",