RhodeCode Development Infrastructure Setup Example#

  1. Configure PATH: Set the environment variable for the workspace path.

    export $WORKSPACE_HOME=/path/to/store
    
  2. Run Setup Script: Execute the setup_dev.sh script to install dependencies. Ensure it’s executable.

    # Fetch script
    curl -L -s -o setup_dev.sh https://code.rhodecode.com/rhodecode-enterprise-docker/raw/master/scripts/dev-tools/setup_dev.sh && chmod +x setup_dev.sh
    # Run script
    ./setup_dev.sh
    
  3. RhodeCode Enterprise-CE Setup:

    • Run the interactive console:

      ./dev-tools ce
      
    • Initialize the database:

      /usr/local/bin/rhodecode_bin/bin/rc-setup-app \
      /home/rhodecode/rhodecode-enterprise-ce/.dev/dev.ini \
      --force-yes \
      --skip-existing-db \
      --user=admin \
      --password=secret \
      --email=admin@example.com \
      --repos=/var/opt/rhodecode_repo_store
      
    • Manually upgrade the database:

      /usr/local/bin/rhodecode_bin/bin/rc-upgrade-db \
      /home/rhodecode/rhodecode-enterprise-ce/.dev/dev.ini \
      --force-yes
      
    • Exit the console:

      exit
      
  4. Configure Waitress Server:

    Add the following configuration below GUNICORN APPLICATION SERVER in vscserver.ini and rhodecode.ini in docker-rhodecode/config/_shared:

    use = egg:waitress#main
    ## Number of worker threads
    threads = 3
    ## MAX BODY SIZE 100GB
    max_request_body_size = 107374182400
    asyncore_use_poll = true
    
  5. Apply Changes:

    cd $WORKSPACE_HOME/rhodecode-vcsserver && cp ../docker-rhodecode/config/_shared/vcsserver.ini .dev/dev.ini
    cd $WORKSPACE_HOME/rhodecode-enterprise-ce && cp ../docker-rhodecode/config/_shared/rhodecode.ini .dev/dev.ini
    
  6. Remove Database Vars:

    In docker-rhodecode/.custom, remove the following variables from .dev.env: RC_DB_URL and RC_SQLALCHEMY_DB1_URL.

  7. Update Makefile:

    Add the following line after dev-env: (line 125) in rhodecode-enterprise-ce/Makefile:

    sudo -u root chown rhodecode:rhodecode /home/rhodecode/.cache/pip/
    
  8. Adjust Permissions:

    chown -R 999:999 $WORKSPACE_HOME/
    
  9. Run RhodeCode Services:

    Open two terminal windows, navigate to $WORKSPACE_HOME/docker-rhodecode in both terminals.

    • In the first terminal, run:

      ./dev-tools ce
      
    • In the second terminal, run:

      ./dev-tools vcs
      

COMMANDS:

  • Run server: make dev-srv

  • Run tests: pytest -v