Finding the article you referred to gave me the missing piece.
Here are the relevant steps. I assume you have a Phoenix app setup and npm installed on you device.
- Install and setup the Elixir Tailwind library. The README of the library is a great resource.
- Publish your app to fly using flyctl. This post is a great guide. Just note that the
fly
commands in the post might need to be replaced withflyctl
commands. - On your local machine,
cd
into your project’sassets
folder and runnpm init
. - From within your
assets
folder, follow the DaisyUI installation steps. - Update the
Dockerfile
generated during the early fly.io deployment. Perform the following
a. Ensure theCOPY lib lib
command comes before theRUN mix assets.deploy
commnd
b. Include this commandRUN npm --prefix ./assets ci --progress=false --no-audit --loglevel=error
in theDockerfile
. This should also come before theRUN mix assets.deploy
command
Expectedly, you should be good to go and your app should properly deploy to fly.io