Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get assets to load when deploying to a server (fly.io) #143

Open
AlmAnderson opened this issue Jul 31, 2024 · 1 comment
Open

Can't get assets to load when deploying to a server (fly.io) #143

AlmAnderson opened this issue Jul 31, 2024 · 1 comment

Comments

@AlmAnderson
Copy link

AlmAnderson commented Jul 31, 2024

I've reviewed every past issue I can find on the topic.

I've gone back through every step of the installation. Everything works great locally, but for the life of me I can't get the docker / fly.io deployment to load the styling. I reviewed a past issue linking to a working docker file and tested everything I every change.

I'm mostly wondering if anyone found a solution to docker/server deployments. Or if anyone thinks of an obvious solution for me.

Here is a server log showing the GET /assets/app.css
And 404 after. I assume the path is wrong or it's getting created in the wrong spot somehow.

image
@davelange
Copy link

davelange commented Sep 29, 2024

I had the same issue deploying to fly.io. Fixed it by specifying the app name in the assets.deploy task (before that I had "tailwind default --minify", which resulted in a 404 also). This is what worked for me:

 "assets.deploy": [
  "tailwind real_app_name --minify",
  "cmd --cd assets node build.js --deploy",
  "phx.digest"
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants