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
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hi everyone,
I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding.
I sta...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #elixirconf-eu
- #metaprogramming
- #hex










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