By ekvixgroup
Hello! I have a Docker application with Node.JS inside which is launched as an App. I’d like to mount a Volume to the App, how can I do this? I have Dockerfile and app.yaml:
app.yaml:
name: media-server
services:
- dockerfile_path: Dockerfile
github:
branch: master
deploy_on_push: true
repo: name/media-server
name: node
http_port: 3010
Dockerfile:
FROM node:16-alpine as builder
RUN apk add --update --no-cache file imagemagick
RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app
WORKDIR /home/node/app
COPY package.json yarn.lock ./
USER node
RUN yarn install
COPY --chown=node:node . .
RUN yarn build
CMD ["yarn", "start"]
EXPOSE 3010
Thank you in advance!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
With the App platform, you currently can not use Block storage volumes. Block storage volumes are detachable network volumes that are mounted directly in the filesystem and extend the storage available to an instance. Because App Platform instances can be scaled and are ephemeral, more work needs to be done to ensure these mounts remain persistent and the data view that each instance sees is consistent.
What you could do is use an S3 storage like the Spaces instead:
https://docs.digitalocean.com/products/app-platform/how-to/store-data/
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.