This questions relates to both, version 0.0.5 and 2.0.0. Apostrophe generates a single hashed .css
file and corresponding .js
when minify is set to true.
We are looking to be able to deploy these files to an s3 bucket or similar and have them hosted from there. The way I see the process likely to be is:
- Let apostrophe generate the files, or use some type of command line to generate these files
- Upload the files with some other task to s3
- Hook somehow into the nunjucks helpers that output the css and js link to include the s3 address ( This could also be useful for just changing the URL to cloudfront)
These step should be run as a pre-task to any deployment action, so that once the new version is started these files are already in place.
I know that 2 calls for 2 static assets is not going to kill the nginx server, however I would prefer having them hosted on a cloud provider.
I would like to ask if this is somehow already handled, and if not, how is it handled in production deployments of A2 at the moment.
The Deploying Apostrophe in the Cloud HOWTO should cover most of these items.