Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 598 Bytes

README.md

File metadata and controls

31 lines (23 loc) · 598 Bytes

Docker Compose Setup

This is a docker-compose setup for a few services I use on my homelab machine.

Tips & Tricks

Migrate from named to bind volume

docker-compose down
# Add to docker-compose
volume-copier:
  image: alpine
  volumes:
    # Named volume
    - data:/source
    # Bind volume path
    - ${CONFIG_PATH}/data:/destination
  command: sh -c "cp -av /source/. /destination/ && echo 'Config copy complete'"

Then run this on the directory

docker-compose run --rm volume-copier

You can now update the volume paths in the services that need it.