Question

How to deploy webpack-ed static content while container image is build, e. g. after npm build was run

Hello! I am new to DigitalOcean, and yet I was able to finally got working my experimental app just in few hours (mostly due to unexpected limitation of dev databases to only Postgres while I was planning to use MongoDb, otherwise it would be even faster). This is anyway much f***ng faster than inability getting verification call from AWS at all after waiting for 2 days. My app is yet too small to scale out with Spaces, but I want to experiment a bit with following: my static assets webpack-ed during npm build as part of image creation, and what I would like to do is to upload the webpack-ed content to a space 'project-name-staticat path like/static/{config-name}/{git-tag}`, with autogeneration of env image variable like

STATIC_CONTENT_PATH="/static/${configuration_name}/${app_git_tag-or-other-deployment-id-value}"

where ${configuration_name} is my CONFIGURATION_NAME variable I set at app component where repo content is deployed to.

Binding prefix like /static/* to a Space looks to be the easiest part of all this, I guess?

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!