Giter Site home page Giter Site logo

Comments (5)

joshprice avatar joshprice commented on May 25, 2024 1

We ended up using something like this where we had multiple Phoenix apps with assets but with a router which didn't have any assets. The router failed to mix ph[oeni]x when priv/static did not exist so we ended up with this solution.

This approach can support Phoenix 1.2 or 1.3 apps. Use yarn by ensuring there is a yarn.lock file in each assets directory.

cd $build_dir

# Phoenix 1.2
mix cmd --app app_a "(yarn install && yarn run deploy) || true"
mix cmd --app app_a mix phoenix.digest

# Phoenix 1.3
mix cmd --app app_b "(cd assets && yarn install && yarn run deploy) || true"
mix cmd --app app_b mix phx.digest

/cc @JonRowe

from heroku-buildpack-phoenix-static.

joshprice avatar joshprice commented on May 25, 2024

Since this seems to be the simplest way to achieve this, it'd be nice to add some instructions to the README

from heroku-buildpack-phoenix-static.

edouardmenayde avatar edouardmenayde commented on May 25, 2024

What is the status on this ?
I would be willing to make this feature happen but I'm not sure where I should start. Any idea ?

from heroku-buildpack-phoenix-static.

JonRowe avatar JonRowe commented on May 25, 2024

A couple of things need to happen,phx.digest needs to not error in an umbrella context if theres no assets folder, a task needs to be able to exist for installing assets that runs across the umbrella.

from heroku-buildpack-phoenix-static.

axelson avatar axelson commented on May 25, 2024

Specifically the install_and_cache_deps() in build.sh also needs to either support multiple assets directories or have a means to be easily disabled:

install_and_cache_deps() {

from heroku-buildpack-phoenix-static.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.