I have an web frontedn app that is a static frontend for a backend system.
My issue the download content that is updated by developers is not in the hart file once I move it toa seperate system. The app works fine in my hab studio,
Restating what I said in slack
ok, I I have a problem. my hart file that I created for my apps web frontend seems to be missing the static files. In my hab studio I see them in /hab/svc/cc-httpd/data however in the package. I don’t see it under/hab/pkgs/lfillmore/cc-hhtpd/2143144/ , the data folder is missing. still new to slack and where I should ask questions. in my studio it works once I offload to the test server site says html files are missing. My question is should I be putting the path in the plan to move the info download from pkg_source to move to /hab/pkgs/lfillmore/cc-httpd/version. I assumed this was automagic I see hooks and config there.
In your own plan you’ve referenced $pkg_svc_data_path which is actually a runtime variable. I believe it can theoretically be used at buildtime, but that path is where the service is going to get run from on a system after the service is installed and started. It’s not necessarily the path you want to use during your build.
Typically the ${pkg_prefix} is the install location for built packages so more often than not you’re going to want your build to deposit files there instead. If for some reason you need those files to exist in the same directory structure your binary is being called from you can also always symlink stuff down into {{pkg.svc_foo_path}} in your init or run hook. Your templatized configs will automatically end up in {{pkg.svc_config_path}} but with @elliott-davis change above yours will need to be updated to point to {{pkg.path}}/data to find your static content!