braindeaf

braindeaf

First application deployed to Gigalixir, no CSS or JS compiled

Just wondering if anyone has had any experience of deploying to Gigalixir with an umbrella app and realising you have no compiled assets? I’ve managed to deploy, the only configuration I can see for triggering the compilation of assets is the package.json in assets. However, I can’t confirm if this is ever run.

The documentation suggests seems to assume that you’re running a web application in the repo root, I think. So it’s fair to assume it might not get run but I am unsure how to actually troubleshoot it.

Any advice for a new to Elixir / Phoenix novice?

RobL

Marked As Solved

braindeaf

braindeaf

I’ve been on support thread with the wonderful team at Gigalixir. So the documentation states that you simply place ./assets/package.json in the root of your repo.

{
  "scripts": {
    "deploy": "cd ../ && mix assets.deploy && rm -f _build/esbuild*"
  }
}

However, since this was an umbrella app I assumed it shoul go into the root of the web application. It would appear that Gigalixir always look for the existence of ./assets/package.json in the root of the repo. But I needed the script to be run in the context of the nested web application.

{
  "scripts": {
    "deploy": "cd ../apps/my_umbrella_app_red_web && mix assets.deploy && rm -f _build/esbuild*"
  }
}

Problem solved, and now I realise I can ssh to the container that was good to confirm the assets actually built at all and ensure they are built in the correct location.

Thanks Gigalixir.

Where Next?

Popular in Questions Top

vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
LegitStack
I’m hoping you guys can give me some general advice and perhaps code examples if you’re feeling up to it. I’m very interested in Elixir,...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: https://hexdocs.pm/ecto/Ecto.Schema.html#module-...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
Exadra37
Sometimes I want to check if the input into a function is not a blank string. My first approach: defmodule Example do def do_stuff(s...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New

Other popular topics Top

lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
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
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New

We're in Beta

About us Mission Statement