Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Migrate Email Dashboard from Heroku to Fly.io #61

Open
4 tasks
nelsonic opened this issue Oct 30, 2022 · 12 comments
Open
4 tasks

Chore: Migrate Email Dashboard from Heroku to Fly.io #61

nelsonic opened this issue Oct 30, 2022 · 12 comments

Comments

@nelsonic
Copy link
Member

Migrate email dashboard from Heroku to Fly.io? https://dwylmail.herokuapp.com/
image

related to: dwyl/learn-heroku#52

Todo

@nelsonic
Copy link
Member Author

$16/month is the lowest we would pay to run this ultra-low volume/overhead App on Heroku:
https://www.heroku.com/pricing
image

For that I would prefer to pay Keila who have a much more advanced Email Drafting, Sending & Tracking App #60

@nelsonic
Copy link
Member Author

https://dashboard.heroku.com/apps/dwylmail
dwylmail-heroku-fail

As you can see, Heroku kindly already deleted all our data:
image

So even if we wanted to pay Salesforce $16/month to host this for us ... we'd be starting from scratch. 🤦‍♂️

Going to try and re-boot this ...

image

https://dashboard.heroku.com/apps/dwylmail/resources/new?addonService=heroku-postgresql
image

https://dwylmail.herokuapp.com/
image

Restart all dynos ... ⏳

image

Yah! 🎉

https://dashboard.heroku.com/apps/dwylmail/logs
image

Useless.

@nelsonic
Copy link
Member Author

Just tried to run this on localhost with Elixir 1.14.3 and got hundreds of warnings! 😖

Tried running: mix ecto.reset got:

warning: use Mix.Config is deprecated. Use the Config module instead
  config/config.exs:8

warning: use Mix.Config is deprecated. Use the Config module instead
  config/dev.exs:1

The database for App.Repo has been dropped
The database for App.Repo has been created

10:18:52.527 [info] == Running 20191113100513 App.Repo.Migrations.CreateTags.change/0 forward

10:18:52.529 [info] create table tags

10:18:52.533 [info] == Migrated 20191113100513 in 0.0s

10:18:52.549 [info] == Running 20191113100912 App.Repo.Migrations.CreateStatus.change/0 forward

10:18:52.549 [info] create table status

10:18:52.551 [info] == Migrated 20191113100912 in 0.0s

10:18:52.552 [info] == Running 20191113100920 App.Repo.Migrations.CreatePeople.change/0 forward

10:18:52.552 [info] create table people

10:18:52.556 [info] create index people_status_index

10:18:52.557 [info] create index people_tag_index

10:18:52.558 [info] == Migrated 20191113100920 in 0.0s

10:18:52.560 [info] == Running 20191113114340 App.Repo.Migrations.AddPersonIdToTag.change/0 forward

10:18:52.560 [info] alter table tags

10:18:52.560 [info] == Migrated 20191113114340 in 0.0s

10:18:52.561 [info] == Running 20191113141229 App.Repo.Migrations.AddPersonIdToStatus.change/0 forward

10:18:52.561 [info] alter table status

10:18:52.566 [info] == Migrated 20191113141229 in 0.0s

10:18:52.567 [info] == Running 20191130210036 App.Repo.Migrations.AddPictureLocaleToPeople.change/0 forward

10:18:52.567 [info] alter table people

10:18:52.568 [info] == Migrated 20191130210036 in 0.0s

10:18:52.570 [info] == Running 20200224224024 App.Repo.Migrations.CreateSent.change/0 forward

10:18:52.570 [info] create table sent

10:18:52.574 [info] create index sent_person_id_index

10:18:52.575 [info] create index sent_status_id_index

10:18:52.576 [info] == Migrated 20200224224024 in 0.0s
MacOSX 10.7 or later required for --file-events
[notice] Application app exited: App.Application.start(:normal, []) returned an error: shutdown: failed to start child: AppWeb.Endpoint
    ** (EXIT) shutdown: failed to start child: Phoenix.PubSub.PG2
        ** (EXIT) shutdown: failed to start child: Phoenix.PubSub.PG2Server
            ** (EXIT) an exception was raised:
                ** (UndefinedFunctionError) function :pg2.create/1 is undefined or private
                    (kernel 8.5.3) :pg2.create({:phx, App.PubSub})
                    (phoenix_pubsub 1.1.2) lib/phoenix/pubsub/pg2_server.ex:43: Phoenix.PubSub.PG2Server.init/1
                    (stdlib 4.2) gen_server.erl:851: :gen_server.init_it/2
                    (stdlib 4.2) gen_server.erl:814: :gen_server.init_it/6
                    (stdlib 4.2) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
[notice] Application phoenix_live_view exited: :stopped
[notice] Application hackney exited: :stopped
[notice] Application metrics exited: :stopped
[notice] Application ssl_verify_fun exited: :stopped
[notice] Application certifi exited: :stopped
[notice] Application mimerl exited: :stopped
[notice] Application idna exited: :stopped
[notice] Application unicode_util_compat exited: :stopped
[notice] Application poison exited: :stopped
[notice] Application ex_aws_lambda exited: :stopped
[notice] Application ex_aws exited: :stopped
[notice] Application joken exited: :stopped
[notice] Application jose exited: :stopped
[notice] Application fields exited: :stopped
[notice] Application html_sanitize_ex exited: :stopped
[notice] Application mochiweb exited: :stopped
[notice] Application syntax_tools exited: :stopped
[notice] Application xmerl exited: :stopped
[notice] Application argon2_elixir exited: :stopped
[notice] Application comeonin exited: :stopped
[notice] Application plug_cowboy exited: :stopped
[notice] Application cowboy exited: :stopped
[notice] Application ranch exited: :stopped
[notice] Application cowlib exited: :stopped
[notice] Application jason exited: :stopped
[notice] Application phoenix_live_reload exited: :stopped
[notice] Application file_system exited: :stopped
[notice] Application phoenix_html exited: :stopped
[notice] Application phoenix_ecto exited: :stopped
[notice] Application runtime_tools exited: :stopped
** (Mix) Could not start application app: App.Application.start(:normal, []) returned an error: shutdown: failed to start child: AppWeb.Endpoint
    ** (EXIT) shutdown: failed to start child: Phoenix.PubSub.PG2
        ** (EXIT) shutdown: failed to start child: Phoenix.PubSub.PG2Server
            ** (EXIT) an exception was raised:
                ** (UndefinedFunctionError) function :pg2.create/1 is undefined or private
                    (kernel 8.5.3) :pg2.create({:phx, App.PubSub})
                    (phoenix_pubsub 1.1.2) lib/phoenix/pubsub/pg2_server.ex:43: Phoenix.PubSub.PG2Server.init/1
                    (stdlib 4.2) gen_server.erl:851: :gen_server.init_it/2
                    (stdlib 4.2) gen_server.erl:814: :gen_server.init_it/6
                    (stdlib 4.2) proc_lib.erl:240: :proc_lib.init_p_do_apply/3

@nelsonic
Copy link
Member Author

This is going to require way too much effort to update.
image

Deleted the postgres instance and shut down the dyno. RIP Heroku. 💀

@nelsonic
Copy link
Member Author

I've poured enough time into attempting to revive this project ... ⏳
image

Just going to cut my losses and move on!

@nelsonic
Copy link
Member Author

Even if we wanted to use Heroku ... we would be forced to upgrade the stack in a few months:

image

The Heroku-18 stack is deprecated
This app is using the Heroku-18 stack, which is deprecated. 
From April 30th, 2023, Heroku-18 will be end-of-life 
and no longer receive security updates. 
From May 1st, 2023, builds will be disabled. 
Please upgrade your app to a newer Heroku stack. 
[ Visit here to learn more](https://help.heroku.com/X5OE6BCA/heroku-18-end-of-life-faq)

That would mean updating the email app to use latest Elixir
and then all the warnings noted above #61 (comment) ⬆️
would be a consistent source of pain.

So the only option would be to manually upgrade the App to Phoenix 1.6.X which is already out-of-date. ⏳

@nelsonic
Copy link
Member Author

Just googled for "Send Email Phoenix" (incognito) and the second result is:
https://github.com/dwyl/learn-phoenix-framework/blob/master/sending-emails.md

image

#SEOMasterPlan 🤯

Need to update it so we don't waste people's time. ⏳

@nelsonic
Copy link
Member Author

Tried again on localhost just to make sure I wasn't going crazy ...

image

SSL error:

==> ssl_verify_fun
Compiling 7 files (.erl)
src/ssl_verify_fun_cert_helpers.erl:13:14: can't find include lib "public_key/include/public_key.hrl"
%   13| -include_lib("public_key/include/public_key.hrl").
%     |              ^

Similar to: dwyl/elixir-invoke-lambda-example#30
i.e. OTP has made a breaking change that means our older Apps fail.

@nelsonic
Copy link
Member Author

@nelsonic
Copy link
Member Author

That was a dead end (way too many steps and not well explained ...)
Reading: https://devheroes.io/en/erlang-elixir-macos-m1/

@nelsonic
Copy link
Member Author

There are a lot of steps ... this shouldn't be this complicated!! 😢

@nelsonic
Copy link
Member Author

Following: elixir-lang/elixir#12681 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Nelson's List
  
More ToDo ThanCanEver Be Done
Development

No branches or pull requests

1 participant