kapa

kapa

Gigalixir - phoenix app, assets are 404

Hi
I’ve put together my first phoenix project that got to a stage that I’d like to deploy it. I’ve chosen gigalixir as it sounds perfect. I’ve done the setup and deployed it - I can access it in the browser and it works, but all the static assets (css, images) are 404 not found.
I’ve run MIX_ENV=prod SECRET_KEY_BASE="$(mix phx.gen.secret)" mix phx.server locally to see if that works and that does. I’ve noticed that locally the assets have a hash generated as a suffix and that’s what the html has, but in the gigalixir deployed html it doesn’t have those hashes, so I assume it’s something to do with that but not sure how to proceed. Any tips are appreciated

First Post!

Fernando

Fernando

Have you compile the assets before deploy? Introduction to Deployment — Phoenix v1.8.8

Last Post!

kapa

kapa

This was it!
I had to add

https://github.com/HashNuke/heroku-buildpack-elixir
https://github.com/gjaldon/heroku-buildpack-phoenix-static

to .buildpacks and things are working now. Thanks for the help

Where Next?

Popular in Questions Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New

Other popular topics Top

rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

We're in Beta

About us Mission Statement