Install rcstack
To get started with RhodeCode get the new shell installer called rcstack
mkdir docker-rhodecode && cd docker-rhodecode curl -L -s -o rcstack https://dls.rhodecode.com/get-rcstack && chmod +x rcstack ./rcstack get-started
rcstack is open-source and you can find source for it here:
https://code.rhodecode.com/rhodecode-enterprise-docker
Pre requisites
To Run this stack Docker engine and Docker Compose needs to be installed on the host machine. Please run ./rcstack init to install docker using the installer, or visit docker site and install docker (min version 20.10) and docker compose:
If there's docker already installed, rcstack will detect that and skip docker installation.
rcstack is using the below command to install docker, if you prefer to install it manually run it before and installer will skip docker installation
curl https://get.docker.com/ | sh
Quick install tutorial
Those are step-by-step installation/run steps.
- initialize; create configurations / docker definitions
Run the following command
./rcstack init
This will ensure docker is installed, copy all required files, and create default configuration. The prompt will ask few question on initial account setup, SSL usage and license-token (only relevant for EE). At this point a custom file under :file:`.custom/.runtime.env` was created. Adjust it if required. Few adjustments that could be done are for example to change the domain address, or SSH port
- Start router to handle all incoming traffic
Start Traefik router that would handle all incoming traffic, load balance.
Note
IMPORTANT: A valid domain needs to be set during bootstrap. This is stored inside .custom/.runtime.env file. To access the RhodeCode stack running the domain needs to be entered in the browser. This can be a local entry or real domain, e.g rhodecode.local or rhodecode.yourcompany.com (pointing to the machine IP) In case machine can't resolve the domain, a 404 page will be shown
Note
IMPORTANT: router binds to some common ports 80, 443, SSH (9022), Loki (3100) if those are not available, please adjust them inside the override docker file :file:`.custom/docker-compose-router.override.yaml`
Run the router stack in the background
./rcstack stack router up --detach
- Start the database
./rcontrol stack database up --detach
Note
By default RhodeCode stack is configured to run PostgreSQL database inside docker. If you need to run mysql, or external database, please disable the database inside services stack. :see: configuration of database
- Start other services required
Run all other required services
./rcstack stack services up --detach
- Start RhodeCode stack
./rcstack stack rhodecode up --detach
- Check stack status
./rcstack status
Output should look similar to this:
--- CONTAINER ID IMAGE STATUS NAMES PORTS ef54fc528e3a traefik:v2.9.5 Up 2 hours rc_cluster_router-traefik-1 0.0.0.0:80->80/tcp, :::80->80/tcp f3ea0539e8b0 rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-rhodecode-1 0.0.0.0:10020->10020/tcp, :::10020->10020/tcp 2be52ba58ffe rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-vcsserver-1 7cd730ad3263 rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-celery-1 dfa231342c87 rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-celery-beat-1 d3d76ce2de96 rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-sshd-1 daaac329414b rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-svn-1 7b8504fb9acb nginx:1.23.2 Up 2 hours (healthy) rc_cluster_services-nginx-1 80/tcp 7279c25feb6b elasticsearch:6.8.23 Up 2 hours (healthy) rc_cluster_services-elasticsearch-1 9200/tcp, 9300/tcp 19fb93587493 redis:7.0.5 Up 2 hours (healthy) rc_cluster_services-redis-1 6379/tcp fb77fb6496c6 channelstream/channelstream:0.7.1 Up 2 hours (healthy) rc_cluster_services-channelstream-1 8000/tcp cb6c5c022f5b postgres:14.6 Up 2 hours (healthy) rc_cluster_services-database-1 5432/tcp
At this point you should be able to access:
RhodeCode instance at your domain entered, e.g http://rhodecode.local, the default access credentials are generated and stored inside .runtime.env. For example:
RHODECODE_USER_NAME=admin RHODECODE_USER_PASS=super-secret-password
Grafana monitoring dashboard at /_grafana subpath. E.g http://rhodecode.local/_grafana, grafana generates default access credentials those need to be changed after first login:
user: admin pass: admin