• Overview
    Key features
    • Observability
    • Auto-scaling
    • Multiframework
    • Security
    Frameworks
    • Django
    • Next.js
    • Drupal
    • WordPress
    • Symfony
    • Magento
    • See all frameworks
    Languages
    • PHP
    • Python
    • Node.js
    • Ruby
    • Java
    • Go
  • Industries
    • Consumer Goods
    • Media/Entertainment
    • Higher Education
    • Government
    • Ecommerce
  • Pricing
  • Featured articles
    • Switching to Platform.sh can help IT/DevOps organizations drive 219% ROI
    • Organizations, the ultimate way to manage your users and projects
  • Support
  • Docs
  • Login
  • Request a demo
  • Free Trial
Meet Upsun. The new, self-service, fully managed PaaS, powered by Platform.sh.Try it now
Blog
Shared network storage now available

Shared network storage now available

console
17 April, 2019
Larry Garfield
Larry Garfield
Director of Developer Experience

Since Platform.sh launched support for worker instances last year, the number-one feature request has been a way to share file mounts between the web application and its workers. We're happy to announce that it can now be done!

Cool! How?

The solution is the new network-storage service container, which runs like any other service in your cluster and offers up mount points instead of network ports. You can add one to your cluster through services.yaml just this easily:

files:
    type: network-storage:1.0
    disk: 2048

That creates a new network service named files (you can name it anything), with a disk capacity of 2 GB.

Now, in .platform.app.yaml, you can declare file mounts that point at that network service rather than at the local disk.

mounts:
  "web/uploads":
    source: service
    service: files
    source_path: uploads

That creates a mount point in the web/uploads directory, which points at the files service. The source_path is the subdirectory in the service. If you have multiple applications mount the same source_path on the same service, poof, they have access to the same files over the network.

It works for workers

That includes workers, too. A local mount source creates a container-specific mount on each app container—one on the web instance and one on the worker instance. A service mount source, however, inherits to both instances and points to the same directory on the storage service. No extra work needed.

It's also possible to define custom mounts for the workers and web instance separately, which can be local or network mounts. And you can mix and match local and service mounts however you need. See the Network Storage documentation for more details.

Get the latest Platform.sh news and resources
Subscribe

Related Content

Simple. Streamlined. Secure. Effortless user management has arrived with Teams

Simple. Streamlined. Secure. Effortless user management has arrived with Teams

Company
AboutSecurity and complianceTrust CenterCareersPressContact us
Thank you for subscribing!
  •  
Field required
Leader Winter 2023
System StatusPrivacyTerms of ServiceImpressumWCAG ComplianceAcceptable Use PolicyManage your cookie preferencesReport a security issue
© 2024 Platform.sh. All rights reserved.
Supported by Horizon 2020's SME Instrument - European Commission 🇪🇺