|
| 1 | +--- |
| 2 | +title: OnTrack Development Setup Guide - 2025T3 |
| 3 | +--- |
| 4 | + |
| 5 | +## Before You Begin |
| 6 | + |
| 7 | +Before starting the setup, ensure the following are installed and ready: |
| 8 | + |
| 9 | +- Visual Studio Code (VS Code) |
| 10 | +- Git |
| 11 | +- A GitHub account (used to fork the repositories) |
| 12 | + |
| 13 | +If you have attempted the setup previously and encountered errors. It is recommended to restart |
| 14 | +Docker Desktop Follow this guide from the beginning to avoid configuration issues. |
| 15 | + |
| 16 | +## 1. INSTALLING DOCKER DESKTOP |
| 17 | + |
| 18 | +Docker Desktop is essential for running the OnTrack development container. |
| 19 | + |
| 20 | +Steps: |
| 21 | + |
| 22 | +- Download Docker Desktop from `docker.com` |
| 23 | + |
| 24 | +- For Windows users: |
| 25 | +- Docker Desktop installation includes Windows Subsystem for Linux (`WSL2`) |
| 26 | +- If `WSL2` isn't automatically installed, follow the setup wizard |
| 27 | +- Docker Desktop installs WSL (aka whistle) as part of the process |
| 28 | + |
| 29 | +- Complete the installation and restart your computer if prompted |
| 30 | + |
| 31 | +- Start Docker Desktop and ensure it is running before proceeding |
| 32 | + |
| 33 | +- Verify installation by opening a terminal and running: |
| 34 | + `docker --version` |
| 35 | + |
| 36 | +IMPORTANT: Keep Docker Desktop running throughout the development process. |
| 37 | + |
| 38 | +## 2. FORKING THE REQUIRED REPOSITORIES |
| 39 | + |
| 40 | +OnTrack consists of three main repositories that need to be forked from Doubtfire LMS: |
| 41 | + |
| 42 | +### Required Repositories |
| 43 | + |
| 44 | +OnTrack consists of three main repositories that need to be forked from Doubtfire LMS: |
| 45 | + |
| 46 | +1. `doubtfire-deploy` |
| 47 | + |
| 48 | + - Contains `docker-compose` configuration |
| 49 | + - Main deployment setup |
| 50 | + |
| 51 | +2. `doubtfire-api` |
| 52 | + |
| 53 | + - Backend API (Ruby on Rails) |
| 54 | + - Contains the Ruby application code |
| 55 | + |
| 56 | +3. `doubtfire-web` |
| 57 | + - Frontend application (Angular) |
| 58 | + - Contains the user interface |
| 59 | + |
| 60 | +### Optional (for testing) |
| 61 | + |
| 62 | +4. `doubtfire-lti` |
| 63 | + - Used for LTI integration testing |
| 64 | + |
| 65 | +How to Fork: |
| 66 | + |
| 67 | +- Navigate to the Thoth Tech GitHub organisation: |
| 68 | + `https://github.com/thoth-tech/` |
| 69 | + |
| 70 | +- For each repository (`deploy`, `api`, `web`): a. Go to the repository page |
| 71 | + b. Ensure you're on the `development` branch initially |
| 72 | + c. Click the **Fork** button in the top-right |
| 73 | + d. Keep all default settings |
| 74 | + e. **Uncheck** “Copy the main branch only” if shown |
| 75 | + f. Click **Create fork** |
| 76 | + |
| 77 | +Your forked repositories will appear at: |
| 78 | + |
| 79 | +- `https://github.com/YOUR_USERNAME/doubtfire-deploy` |
| 80 | +- `https://github.com/YOUR_USERNAME/doubtfire-api` |
| 81 | +- `https://github.com/YOUR_USERNAME/doubtfire-web` |
| 82 | + |
| 83 | +## 3. PULLING THE DOCKER IMAGE |
| 84 | + |
| 85 | +Before starting development, pull the required Docker image from Docker Hub. |
| 86 | +The Docker image contains all dependencies for OnTrack development. |
| 87 | + |
| 88 | +Steps: |
| 89 | + |
| 90 | +- Open Docker Desktop terminal (recommended for Windows users) |
| 91 | +- In Docker Desktop, click the terminal icon at the bottom |
| 92 | + |
| 93 | +- Run the following command: |
| 94 | + `docker pull lmsdoubtfire/formatif-dev-container:10.0.0-14` |
| 95 | + |
| 96 | +Note: |
| 97 | + |
| 98 | +- The version number (`10.0.0-14`) comes from the `docker-compose.yaml`. |
| 99 | +- File in the `doubtfire-deploy` repository. |
| 100 | + |
| 101 | +- This will download all dependencies and may take several minutes |
| 102 | + |
| 103 | +- Verify the image was pulled by running: |
| 104 | + `docker images` |
| 105 | + You should see `lmsdoubtfire/doubtfire-dev-container:10.0.0-14` |
| 106 | + |
| 107 | +Where to find the image version: |
| 108 | + |
| 109 | +- Open `doubtfire-deploy/docker-compose.yaml` |
| 110 | +- Look under `services` > `image` |
| 111 | +- The format is: `lmsdoubtfire/doubtfire-dev-container:[version]` |
| 112 | + |
| 113 | +## 4. CLONING REPOSITORIES LOCALLY |
| 114 | + |
| 115 | +Now clone your forked repositories to your local machine. |
| 116 | + |
| 117 | +Steps: |
| 118 | + |
| 119 | +- Open your terminal (PowerShell on Windows, Terminal on macOS/Linux) |
| 120 | + |
| 121 | +- Navigate to your preferred directory: `cd ~` |
| 122 | + or |
| 123 | + `cd C:\Users\YOUR_USERNAME\Documents\Projects` |
| 124 | + |
| 125 | +- Clone `doubtfire-deploy` first: `git clone https://github.com/YOUR_USERNAME/doubtfire-deploy.git` |
| 126 | + |
| 127 | +- Navigate into the directory: `cd doubtfire-deploy` |
| 128 | + |
| 129 | +- Clone the remaining repositories: `git clone https://github.com/YOUR_USERNAME/doubtfire-api.git` |
| 130 | + `git clone https://github.com/YOUR_USERNAME/doubtfire-web.git` |
| 131 | + |
| 132 | +- (Optional) Clone `doubtfire-lti`: `git clone https://github.com/YOUR_USERNAME/doubtfire-lti.git` |
| 133 | + |
| 134 | +You should now have: `doubtfire-deploy/` |
| 135 | +`├── doubtfire-api/` |
| 136 | +`├── doubtfire-web/` |
| 137 | +`└── doubtfire-lti/ (optional)` |
| 138 | + |
| 139 | +## 5. SETTING UP GIT REMOTES |
| 140 | + |
| 141 | +Git remotes allow you to sync with both your fork (`origin`) and the ThothTech repository |
| 142 | +(`upstream`). |
| 143 | + |
| 144 | +Understanding remotes: |
| 145 | + |
| 146 | +- `origin`: your forked repository on GitHub |
| 147 | +- `upstream`: ThothTech’s repository |
| 148 | + |
| 149 | +Steps for `doubtfire-deploy`: |
| 150 | + |
| 151 | +- Check current remotes: |
| 152 | + `git remote -v` |
| 153 | + |
| 154 | +- Add ThothTech as upstream: |
| 155 | + `git remote add upstream https://github.com/thothtech/doubtfire-deploy.git` |
| 156 | + |
| 157 | +- Verify: |
| 158 | + `git remote -v` |
| 159 | + |
| 160 | +Repeat the same steps for: |
| 161 | + |
| 162 | +- `doubtfire-api` |
| 163 | +- `doubtfire-web` |
| 164 | + |
| 165 | +## 6. SWITCHING TO THE CORRECT BRANCH |
| 166 | + |
| 167 | +IMPORTANT: You must work on the `10.0.x` branch, not `main` or `development`. |
| 168 | + |
| 169 | +For each repository: |
| 170 | + |
| 171 | +- Check current branch: `git branch` |
| 172 | +- Switch branch: `git checkout 10.0.x` |
| 173 | +- Pull latest changes: `git pull` |
| 174 | +- Verify: `git status` |
| 175 | + |
| 176 | +(Optional but recommended): |
| 177 | +`git fetch` |
| 178 | + |
| 179 | +## 7. OPENING IN VS CODE |
| 180 | + |
| 181 | +Now open the `doubtfire-deploy` directory in VS Code. |
| 182 | + |
| 183 | +Steps: |
| 184 | + |
| 185 | +- From the `doubtfire-deploy` directory, run: |
| 186 | + `code .` |
| 187 | + |
| 188 | +Alternatively: |
| 189 | + |
| 190 | +- Open VS Code manually |
| 191 | +- Select **File > Open Folder** |
| 192 | +- Choose the `doubtfire-deploy` folder |
| 193 | + |
| 194 | +## 8. STARTING THE DEVELOPMENT CONTAINER |
| 195 | + |
| 196 | +The development container runs all OnTrack services inside Docker. |
| 197 | + |
| 198 | +Automatic method: |
| 199 | + |
| 200 | +- VS Code will detect the `.devcontainer` configuration |
| 201 | +- A popup will appear saying **“Reopen in Container”** |
| 202 | +- Click **Reopen in Container** |
| 203 | + |
| 204 | +Manual method: |
| 205 | + |
| 206 | +- Press `Ctrl+Shift+P` (`Cmd+Shift+P` on macOS) |
| 207 | +- Type `Dev Containers: Reopen in Container` |
| 208 | +- Select the option |
| 209 | + |
| 210 | +## 9. ACCESSING THE APPLICATION |
| 211 | + |
| 212 | +Once the container is running, OnTrack will be accessible via your browser. |
| 213 | + |
| 214 | +Ports: |
| 215 | + |
| 216 | +- `localhost:4200` – OnTrack frontend (Angular) |
| 217 | +- `localhost:3000` – OnTrack API (Ruby on Rails) |
| 218 | + |
| 219 | +Default admin credentials: |
| 220 | + |
| 221 | +- Username: `admin` |
| 222 | +- Password: `password` |
| 223 | + |
| 224 | +## 10. TROUBLESHOOTING |
| 225 | + |
| 226 | +Issue: Docker Desktop not running |
| 227 | +Solution: |
| 228 | + |
| 229 | +- Open Docker Desktop |
| 230 | +- Wait for it to fully start |
| 231 | +- Reopen the container in VS Code |
| 232 | + |
| 233 | +Issue: Wrong branch |
| 234 | +Solution: |
| 235 | + |
| 236 | +- Run `git checkout 10.0.x` |
| 237 | + |
| 238 | +Issue: CSS not loading |
| 239 | +Solution: |
| 240 | + |
| 241 | +- Wait a few minutes |
| 242 | +- Refresh the page |
| 243 | + |
| 244 | +## CONCLUSION |
| 245 | + |
| 246 | +You have now successfully set up the OnTrack development environment. |
| 247 | + |
| 248 | +Document Version: 2025T3 |
| 249 | +Last Updated: November 2025 |
| 250 | +Author: Jayam Patel |
0 commit comments