I have an api running that needs images uploaded to it.
I’ve mounted the volume with the docker. When I upload a file and then retrieve it the file is found. If I close the container and re-build it the file is gone.
When I look at the /mnt/poductionvolume/data/ folder the /uploads folder is present but empty.
It seems that the files are not being copied to the mounted volume.
Any help is appreciated.
Docker-Compose File
File api:
container_name: api
build: ../Indy-Distro-App/indy-distro-server
restart: always
environment:
- API_USER_PASSWORD=${USER_PASSWORD}
- API_HOST=${API_HOST}
- VIRTUAL_HOST=host.com
- LETSENCRYPT_HOST=host.com
- LETSENCRYPT_EMAIL=abc@gmail.com
ports:
- "8888:8888"
expose:
- 8888
links:
- mongo-database
volumes:
- /mnt/productionvolume/data/uploads:/uploads
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!
Not a volumes expert but you may need to define top-level named volume since you want to reuse them.
Have a good read through the docs and the first example.
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.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.