# Using container storage for other workloads

**URL:** <https://forums.suse.com/t/using-container-storage-for-other-workloads/16826>\
**Category:** SUSE Rancher Prime\
**Created:** [March 11, 2020, 1:50pm UTC](https://forums.suse.com/t/using-container-storage-for-other-workloads/16826 "2020-03-11T13:50:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghorio\_fuitton](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/ghorio_fuitton/32/6165_2.png) [@ghorio\_fuitton](https://forums.suse.com/u/ghorio_fuitton)\
**Post date:** [March 11, 2020, 1:50pm UTC](https://forums.suse.com/t/using-container-storage-for-other-workloads/16826/1 "2020-03-11T13:50:42Z")

</div>

Hi all,

Currently I have a laravel app which source code is being built on gitlab and then a docker image is pushed to registry containing the source code rand unning laravel on php-fpm+nginx when container is run. I have deployed this on Rancher 2.3.2 running one workload. So whenever there is a code change, a new docker image is built and re-deployed.

What I am looking for is if its possible to run separate nginx container(workload) which then uses data (laravel code) from php-fpm container(workload). So it would make 2 separate workloads, but only laravel php container should have to be built and re-deployed whenever there is a change in a code. This could let me also add separate cronjob container(workload) later on which would also use data only from php-fpm container etc. Is this possible?

I believe this is somehow possible with volumes, but when I try to mount a new PV to my workload under /var/www/ (this is where laravel code is), and then deploy workload, everything is empty under /var/www/ inside container as it overrides everything from hostPath.  
What I would like to know is if this can be done and maybe I am imagining it completely wrong. Is there any best practice for such services running on Rancher?

Thanks!
