So, I have a Flask application (based on the great starter application at https://github.com/sloria/cookiecutter-flask) that I am trying to setup for deployment to elastic beanstalk. The application uses the bower package manager to install javascript libraries and dependencies.
The Problem: I have setup my container to correctly install npm and bower (using the sample from https://gist.github.com/growingdever/8eb2ae8e5793b9c1cd09) and the associated .css and .js assets are all available to my application (using Flask-Assets), but the associated image and fonts files are still in their package directories.
My proposed solution: I need to collect them all and move them to app/static/images and app/static/fonts for the packages to find them. Has anyone solved this problem before?
So the simple solution is the best. Using symlinks to put the files in the right place works.
An alternative would be running
container_commandsto copy the files from thebowerpackages works. In the snippet below, you can replace the wordappwith the directory/name of your app. I have toldbowerto install packages intoapp/static/libs.Arguably, it might be easier to write a small
asset_setup.shand run that instead of embedding the copy commands in the.ebextensionsconfig files.