Enable using host storage instead of docker volumes

By default rcstack creates these volumes to store repositories, and different caches such as artifacts, or archive caches

- rc_reposvolume:/var/opt/rhodecode_repo_store
- rc_datavolume:/var/opt/rhodecode_data

It’s possible to simply mount your host directories instead of using docker volumes. This allows to mount your existing repositories structures, without copying them or moving into docker itself.

For migration purposes it also allows to simply re-use existing storage paths from rccontrol.

Open .custom/docker-compose-apps.override.yaml and uncomment the custom mounts for each application This needs to be set for all of them otherwise there’s mismatch what containers will see

services:

  rhodecode:

    deploy:
      # set number of instances of services to be spawned on stack start
      replicas: 1

    environment:
      RC_COMPOSE_OVERRIDE: 1
      #DB_UPGRADE: 0  # 1 run the DB upgrade, 0 disable db upgrade at startup
      #SETUP_APP: 0   # run the application default settings setup, can be turned off after initial run

#    volumes:
#      # mount the host dir into repo storage path on container
#      # format is YYY:XXX, where YYY is /path/on/host and YYY is path on docker.
#      - /home/my-user/rc-repos:/var/opt/rhodecode_repo_store
#      - /home/my-user/rc-data:/var/opt/rhodecode_data

So in case your repositories now are stored in /home/rhodecode/repositories and you want rhodecode data to be kept in /home/rhodecode/data here’s how a volume section should look like for each app (rhodecode, celery, celery-beat, svn, sshd, vcsserver)

volumes:
  # mount the host dir into repo storage path on container
  # format is YYY:XXX, where YYY is /path/on/host and YYY is path on docker.
  - /home/rhodecode/repositories:/var/opt/rhodecode_repo_store
  - /home/rhodecode/data:/var/opt/rhodecode_data