-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Milestone
Description
Add support for locally mapped volumes. This could be implemented by building a sidecar image from the mapped files.
version: '3'
services:
nextjs:
restart: always
image: caddy:2.7.6
command: ["caddy", "file-server", "--root", "/static", "--listen", ":80"]
#x-defang-static-files: /static
volumes:
- ./:/static
ports:
- target: 80
published: 8000
mode: ingressCurrently this emits a warning.
Discussion on what we should do based on customer needs, when do we need volumes?
- Dumb static website case, i.e. snake game by vibe coder. Very rarely there is code should be served without a building step, i.e. typescript, react, nextjs etc. This is already covered by current static-website case, or the user would be having a dockerfile for building, which would not require volume mount
- Mounting large files at runtime to avoid building huge images, i.e. LLM models. This is no longer needed by the majority, as most people use hosted models
- Mounting a volume to read-write files: most likely application needs to persist state as files locally
- Due to software limitation, not able to use a remote database, or by design, i.e. NATS use case
- Due to inexperience: It is nearly impossible to share read/write files correctly amongst multiple instances, will not scale
As a result, the most useful volume mount support we can provide for our users are, single instance mount to a disk with RO/RW support. This may also be extended to covers case 1, where a dumb website could be served from it if we implement data copy to the volume.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels