I have 2 services in docker-compose
one downloads data, and creates a file and attaches it to a volume, which makes it accessible to other container. That works fine.
The issue am having is, I want to append the file datadump.json
in the /home-dir/
without overwriting any data in there. Just add the file to the existing folder which has other files.
scheduler:
build:
context: .
dockerfile: scheduler.Dockerfile
environment:
- HEROKU_API_KEY=*****
command: bash -c "heroku run python manage.py dumpdata > datadump.json --app my-app && mv datadump.json data-dump && ls cb-data-dump"
volumes:
- data-dump:/data-dump
app:
restart: always
build: .
ports:
- 8000:8000
volumes:
- data-dump:/data-dump/
- ./:/home-dir/