Open mingyar opened 1 year ago
Hey @mingyar π you're up early (late?) for Brazil. π§π· βοΈ π All questions are welcome. π
You appear to be using a prod.secret.exs
file for your secrets. Do you need it?
If not, simply comment out the line in your prod.exs
file e.g:
https://github.com/dwyl/auth/blob/f6a72102fd72f99ba8c42d00083e22c2fdec917a/config/prod.exs#L55
That should deploy fine. If not, share the next error message you see and we will attempt to help you debug. π¦
Hi @nelsonic ππ» Yup, I was up a bite late (around 3 a.m. here in Brazil), trying to make this deploy work π
Yes! That was my guess, I think I don't need it since I have a releases.exs
that looks like this:
import Config
config :rockelivery, RockeliveryWeb.Endpoint,
server: true,
http: [port: {:system, "PORT"}],
url: [host: System.get_env("APP_NAME") <> ".gigalixirapp.com", port: 443]
I'll try to comment that and let's see what happens!
Thank you for helping @nelsonic!
Apparently the deploy has been made, but my app status keeps unhealthy:
Then I'm tried to run the release locally, so I did:
SECRET_KEY_BASE="$(mix phx.gen.secret)" MIX_ENV=prod DATABASE_URL="postgresql://postgres:postgres@localhost:5432/rockelivery" PORT=4000 mix phx.server
and now Iβm getting:
** (RuntimeError) connect raised KeyError exception: key :database not found. The exception details are hidden, as they may contain sensitive data such as database credentials. You may set :show_sensitive_data_on_connection_error to true when starting your connection if you wish to see all of the details
(elixir 1.12.2) lib/keyword.ex:420: Keyword.fetch!/2
(postgrex 0.16.3) lib/postgrex/protocol.ex:160: Postgrex.Protocol.connect_endpoints/6
(db_connection 2.4.2) lib/db_connection/connection.ex:82: DBConnection.Connection.connect/2
(connection 1.1.0) lib/connection.ex:622: Connection.enter_connect/5
(stdlib 3.13) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Which explain why the app status is unhealthy
.
Any ideas on why this is happening?
Hmm thatβs strange. How is :database required in your config prod.exs file?
I find out what was happening!
I was following instructions during this course that I'm doing.
So I had prod.secret.exs
on my .gitignore
file π€‘ (because we supposed should)
Aaaand, yes, you can imagine what comes next:
I checked the .gitignore
from the instructors repository, and guess what?
He doesn't had prod.secret.exs
on his .gitignore
π€¦π»ββοΈ π€¦π»ββοΈ π€¦π»ββοΈ
That's why the all thing was working for him end not for me π¦
good detective work. π Glad you figured it out. π
what "course" are you following? π
I just finished the Elixir trail from Ignite.
Ignite is a program from Rocketseat, looks pretty much like pluralsight or codeschool.
Hey guys! How things are going over there? π
First, thank you for having me at dwl! π€
Second, I'm not sure if this is the right place for this kind of question, but here we go:
I using Elixir releases and when I hit:
git push gigalixir
I got:Am I missing something?