Skip to content

Commit

Permalink
Update dependencies, elixir to 1.17. Update sign in form with new aut…
Browse files Browse the repository at this point in the history
…h error message
  • Loading branch information
skanderm committed Nov 14, 2024
1 parent 5f03e11 commit 84f1d7b
Show file tree
Hide file tree
Showing 16 changed files with 56 additions and 77 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Largely based on https://github.com/nicbet/docker-phoenix/blob/main/Dockerfile

FROM node:22.9.0-alpine@sha256:c9bb43423a6229aeddf3d16ae6aaa0ff71a0b2951ce18ec8fedb6f5d766cf286 AS node
FROM elixir:1.16-otp-26-alpine@sha256:829bebfcdc6fc58c56effc0d77f660de7c902fcf74e785b3175ee3a8f739b3f5 AS setup
FROM elixir:1.17-otp-27-alpine@sha256:a1428b2bf7c25dcea1f40fec1991dc931c4307235a279f1c71d315586bd8297c AS setup


### Install deps
Expand Down
4 changes: 2 additions & 2 deletions server/.tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
erlang 26.1.1
elixir 1.16.0-otp-26
erlang 27.1.2
elixir 1.17.3-otp-27
python 3.12.4
1 change: 0 additions & 1 deletion server/config/prod.exs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import Config
# manifest is generated by the mix phx.digest task
# which you typically run after static files are built.
config :orcasite, OrcasiteWeb.Endpoint,
load_from_system_env: true,
force_ssl: [rewrite_on: [:x_forwarded_proto]],
watchers: [npm: ["run", "start", cd: Path.expand("../ui", __DIR__)]],
check_origin: (System.get_env("URLS") || "") |> String.split(" ")
Expand Down
2 changes: 1 addition & 1 deletion server/lib/orcasite/logger.ex
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ defmodule Orcasite.Logger do
end

defp metadata(ref) when is_reference(ref) do
'#Ref' ++ rest = :erlang.ref_to_list(ref)
~c"#Ref" ++ rest = :erlang.ref_to_list(ref)
rest
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ defmodule Orcasite.Notifications.NotificationInstance do
belongs_to :notification, Notification
end

code_interface do
define :update, action: :update, args: [:status, :meta, :processed_at]
end
# code_interface do
# define :update, action: :update, args: [:status, :meta, :processed_at]
# end

resource do
description """
Expand Down
1 change: 1 addition & 0 deletions server/lib/orcasite/radio/audio_image.ex
Original file line number Diff line number Diff line change
Expand Up @@ -219,5 +219,6 @@ defmodule Orcasite.Radio.AudioImage do

graphql do
type :audio_image
attribute_types [feed_id: :id]
end
end
1 change: 1 addition & 0 deletions server/lib/orcasite/radio/audio_image_feed_segment.ex
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ defmodule Orcasite.Radio.AudioImageFeedSegment do

graphql do
type :audio_image_feed_segment
attribute_types [feed_segment_id: :id]
end
end
1 change: 1 addition & 0 deletions server/lib/orcasite/radio/candidate.ex
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ defmodule Orcasite.Radio.Candidate do

graphql do
type :candidate
attribute_types [feed_id: :id]

queries do
get :candidate, :read
Expand Down
1 change: 1 addition & 0 deletions server/lib/orcasite/radio/detection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ defmodule Orcasite.Radio.Detection do

graphql do
type :detection
attribute_types [candidate_id: :id, feed_id: :id]

queries do
get :detection, :read
Expand Down
1 change: 1 addition & 0 deletions server/lib/orcasite/radio/feed_segment.ex
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ defmodule Orcasite.Radio.FeedSegment do

graphql do
type :feed_segment
attribute_types [feed_id: :id, feed_stream_id: :id]

queries do
list :feed_segments, :index
Expand Down
15 changes: 0 additions & 15 deletions server/lib/orcasite_web/endpoint.ex
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,4 @@ defmodule OrcasiteWeb.Endpoint do
plug Corsica, origins: "*", allow_headers: :all
plug Plug.Session, @session_options
plug OrcasiteWeb.Router

@doc """
Callback invoked for dynamically configuring the endpoint.
It receives the endpoint configuration and checks if
configuration should be loaded from the system environment.
"""
def init(_key, config) do
if config[:load_from_system_env] do
port = System.get_env("PORT") || raise "expected the PORT environment variable to be set"
{:ok, Keyword.put(config, :http, [:inet6, port: port])}
else
{:ok, config}
end
end
end
11 changes: 0 additions & 11 deletions server/lib/orcasite_web/graphql/errors/authentication.ex

This file was deleted.

1 change: 1 addition & 0 deletions server/lib/orcasite_web/graphql/schema.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ defmodule OrcasiteWeb.Schema do
use Absinthe.Schema

@domains [Orcasite.Radio, Orcasite.Accounts, Orcasite.Notifications]
# @domains []

use AshGraphql, domains: @domains

Expand Down
9 changes: 4 additions & 5 deletions server/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ defmodule Orcasite.Mixfile do
# Algorithm used by Comeonin to hash password
{:bcrypt_elixir, "~> 3.0"},
# JSON parser, works with Absinthe out of the box
{:poison, "~> 5.0"},
{:poison, "~> 6.0"},
{:logfmt, "~> 3.0"},
{:geo_postgis, "~> 3.0"},
{:jason, "~> 1.2"},
# Reverse proxy for proxying to nextjs app
{:reverse_proxy_plug, "~> 2.3.0"},
{:reverse_proxy_plug, "~> 3.0"},
{:httpoison, "~> 2.2"},
{:corsica, "~> 2.1"},
{:telemetry_metrics, "~> 1.0"},
Expand All @@ -86,10 +86,9 @@ defmodule Orcasite.Mixfile do
{:ash_authentication, "~> 4.2"},
{:ash_authentication_phoenix, "~> 2.0"},
{:syn, "~> 3.3"},
{:mjml, "~> 3.0.1"},
{:mjml, "~> 4.0"},
{:zappa, github: "skanderm/zappa", branch: "master"},
{:ash_uuid, github: "skanderm/ash_uuid", tag: "5140d0"},
# {:ash_uuid, "~> 1.1.1"},
{:ash_uuid, "~> 1.1.2"},
{:ash_graphql, github: "ash-project/ash_graphql", branch: "main"},
{:ash_json_api, "~> 1.2"},
{:open_api_spex, "~> 3.16"},
Expand Down
Loading

0 comments on commit 84f1d7b

Please sign in to comment.