charlesjavelona
Deploying to Gigalixir not working
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
First Post!
ruslandoga
Any idea on why cowboy doesn’t show IP on prod?
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.com is interpreted correctly by gigalixir, since it seems like it’s not, otherwise it would’ve been replaced with env vars at
23:02:10.310 [info] Access BujiWeb.Endpoint at http://${APP_NAME}.gigalixirapp.com:443
By default neither phoenix nor elixir config support env var templates like this.
Popular in Questions
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
Hello all!
I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service.
Currently when I de...
New
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set?
Thanks.
New
I would like to know what is the best IDE for elixir development?
New
Hey all, just started picking up Elixir last week and am writing a scraper as a learning project.
Baby step #1 is extracting the number ...
New
I have a User schema with a :from_id field set to type :string:
defmodule TweetBot.Repo.Migrations.CreateUsers do
use Ecto.Migration
...
New
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
Hi guys, nice to meet you to the whole forum, I’m new here, I’m trying to configure visual studio code for elixir, right now the intellis...
New
Other popular topics
Here are few pieces of (common) Linux knowledge that we use for reasonably small one server apps. We use Ubuntu but this should work for ...
New
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
What is most correct way to open, read and parse JSON file with poison?
For example if we have example.json file in root of some projec...
New
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
Hey,
Just curious what are the main benefits of Elixir compared to Clojure?
When is Elixir more useful than Clojure and vice versa?
Th...
New
Hello, I have map which I want to convert it to string like this:
the map:
%{last_name: "tavakkoli", name: "shahryar"}
the string I ne...
New
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
New
Hi all,
I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage.
I'm trying to use Postg...
New







