=================== Migration to Docker =================== Migrate old pre 4.28.0 installer based releases ----------------------------------------------- 1. Decide on components use +++++++++++++++++++++++++++ By default, RhodeCode stack uses Redis and Postgres. We recommend using those in Docker as things like backup/restore are much easier, and possible to run by our installer If you plan to use your own redis or DB, disable those services in :file:`.custom/docker-compose-services.override.yaml` by setting ``replicas: 0`` TODO: SEE COMPONENT CONFIGURATION Select your DB type by commenting postgres or mysql db in :file:`.custom/docker-compose-services.override.yaml` For Sqlite, disable both DB types. .. note:: Selecting your own Redis, DB etc would require pointing to those instance inside .ini config files. By default rcstack is configured to talk to docker based addresses of those services. 2. Copy over your old configuration into new shared config dir ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: cp rhodecode.ini to config/_shared/rhodecode_old.ini cp vcsserver.ini to config/_shared/vcsserver_old.ini Then compare the new files e.g :file:`rhodecode.ini` with :file:`rhodecode_old.ini` and adjust accordingly, most important are location of storages/redis/db connection urls. 3. launch stack based on get started ++++++++++++++++++++++++++++++++++++ Run an init command & launch the full stack .. code-block:: ./rcstack init ./rcstack stack all up -d 4. make a db dump +++++++++++++++++ If docker-based DB is selected, otherwise this step can be skipped. create a backup of your existing database, so it can be migrated to docker instance. If you plan to use you old running DB, this step can be omitted. Adjust rhodecode.ini to point your docker rhodecode to old DB 5. restore db +++++++++++++ If docker-based DB is selected Restore the database into docker container running DB 6. move data into docker storage ++++++++++++++++++++++++++++++++ Step one is to move the required componenst to the :file:`.custom/storage` directory inside the docker compose stack. This directory is mounted later on so data can be copied over into docker storage engine volumes. .. code-block:: #. mv repositories data to .custom/storage +++++ #. mv gists data to .custom/storage +++++ #. mv artifacts data to .custom/storage +++++ Once that is done. .. code-block:: #. mv tarball cache data to .custom/storage +++++ #. ./rcstack cli storage +++++ #. move repos to /vol/repovolume +++++ #. move artifacts data to /vol/datavolume +++++ #. move tarballcache data to /vol/datavolume +++++