Comments (5)
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.
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.
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.
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.
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:
heroku-buildpack-phoenix-static/lib/build.sh
Line 117 in fa86249
from heroku-buildpack-phoenix-static.
Related Issues (20)
- Build is failing with NPM_TOKEN issue HOT 2
- My build just failed on phoenix.digest vs phx.digest HOT 1
- The build is failing if there is a .yarnrc with --cwd at the root HOT 1
- Support the new Cloud Native Buildpack (CNB) format.
- Files are compiled on startup
- New versions of node break the build HOT 17
- Remove default node_version
- Support for Yarn 2?
- Update heroku commands
- ngrok Error: certificate has expired HOT 3
- question about deployment to heroku with waypoint
- nodebin.herokai.com not resolving HOT 1
- Yarn error: "Command "deploy" not found." HOT 6
- Setup test suite and CI
- Heroku Build Fails HOT 2
- heroku build fails when node patch not specified HOT 4
- Improve error message below Phoenix 1.4?
- Is it possible to skip audit when building? HOT 3
- Is it possible to cache digested Phoenix output? HOT 4
- Installs an ancient version of yarn by default HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heroku-buildpack-phoenix-static.