charlesjavelona
Deploying to prod on gigalixir shows: {"errors":{"detail":"Not Found"}}
No node for static files. It’s all API based.
When it’s delivered to dev it works.
$ - mix phx.server
[info] Running BujiWeb.Endpoint with cowboy 2.9.0 at 0.0.0.0:4000 (http)
[info] Access BujiWeb.Endpoint at http://localhost:4000
When it’s delivered to prod it doesn’t work
$ - MIX_ENV=prod mix phx.server
23:02:10.298 [info] Running BujiWeb.Endpoint with cowboy 2.9.0 at :::4000 (http)
23:02:10.310 [info] Access BujiWeb.Endpoint at http://${APP_NAME}.gigalixirapp.com:443
Any idea on why cowboy doesn’t show IP on prod? It crashes.
config/prod.exs
use Mix.Config
config :buji, BujiWeb.Endpoint,
server: true,
http: [port: {:system, "PORT"}], # Needed for Phoenix 1.2 and 1.4. Doesn't hurt for 1.3.
url: [host: "${APP_NAME}.gigalixirapp.com", port: 443],
secret_key_base: "${SECRET_KEY_BASE}",
version: Mix.Project.config[:version] #To bust cache during hot updgrades
config :buji, Buji.Repo,
adapter: Ecto.Adapters.Postgres,
url: "${DATABASE_URL}",
database: "",
ssl: true,
pool_size: 2
# For production, don't forget to configure the url host
# to something meaningful, Phoenix uses this information
# when generating URLs.
#
# Note we also include the path to a cache manifest
# containing the digested version of static files. This
# manifest is generated by the `mix phx.digest` task,
# which you should run after static files are built and
# before starting your production server.
# Do not print debug messages in production
config :logger, level: :info
Trending in Questions
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
Hey guys,
I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly
Do you guys have any suggestions what is the best prac...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
Hello,
I’m developing a online persistent chat system (what’s app) like using elixir/dynamodb/aws for a mobile app(flutter).
The diffic...
New
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
I think I’ve found a small improvement I could contribute to <%= web_namespace %>.CoreComponents (installer/templates/phx_web/compo...
New
Other Trending Topics
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
Aludel - LLM Evaluation Workbench
Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New
Latest Phoenix Threads
Latest on Elixir Forum
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #ai
- #elixirconf-us
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 9- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
ruslandoga
It does show it, but it’s using ipv6 where zeros are ommited,
:::4000, means it binds on all interfaces. I haven’t used gigalixir, but if I were you I’d double-check if${APP_NAME}.gigalixirapp.comis interpreted correctly by gigalixir, since it seems like it’s not, otherwise it would’ve been replaced with env vars atBy default neither phoenix nor elixir config support env var templates like this.
karlosmid
Where did you run above cmd?
Could you post all gigalixir log here, there must be more information about the error.
charlesjavelona
This is what the doc says, but it seems outdated. Will try a different way.
charlesjavelona
The above command is ran locally to test prod environment. Prod log is below. Most recent.
config/prod.exs
karlosmid
This is what works for me:
I also have releases.exs
charlesjavelona
So, I rewrote everything to release.exs.
Same problem
config/release.exs
Locally, tried it too. Got this
To give context, I don’t have webpack. Purely using elixir for API. The root url shows this in local dev
If I use local dev to connect to the API it works. But in prod it doesn’t. Anything else I should try I’ve exhausted 3 of the options to deploy(release, mix, distillery). It must be something I’ve done because it’s only API based. I tried the getting started with webpack and it works.
charlesjavelona
Here’s an update, since I ran the command below to only have API’s.
mix phx.new ~/Workspace/hello_world --no-html --no-webpackI thought deleting the
Plug.Staticwould change things in /lib/APP_NAME/APP_NAME_WEB/endpoint.ex. The section below was deleted since I don’t need it.Gigalixir has now the following error log:
dimitarvp
So what’s around line 34 in
config/releases.exs?karlosmid
This instructions worked for me: Using Elixir Releases — GIGALIXIR 1.4.0 documentation