Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ export default defineConfig({
label: 'OnTrack Intial Setup Guidance',
link: '/setup/set',
},
{
label: '8.0.x & 9.x Setup Guidance',
link: '/setup/8x9x',
},
],
},

Expand Down Expand Up @@ -59,7 +63,7 @@ export default defineConfig({
{
label: 'activity types',
link: '/backend/api/activity_types',
},
},
{
label: 'admin',
link: '/backend/api/admin',
Expand Down Expand Up @@ -207,7 +211,7 @@ export default defineConfig({
{
label: 'Backend APIs',
link: '/courseflow/backend',
}
},
],
},
],
Expand Down
77 changes: 77 additions & 0 deletions src/content/docs/setup/8x9x.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
title: Windows Setup Guide for 8.x & 9.x Branches
---

> **Note:** This guide addresses a known issue affecting Windows users when setting up the development environment for the 8.0.x and 9.x branches. macOS users are not impacted and do not require these steps.

# Windows Development Environment Setup

Follow the steps below to ensure a smooth setup process on Windows for the 8.0.x and 9.x branches of Doubtfire. These instructions must be followed each time you switch between these branches.

---

## 1. Switch All Repositories to the Target Branch

Ensure that all three repositories—`doubtfire-deploy`, `doubtfire-web`, and `doubtfire-api`—are checked out to the branch you intend to work on (`8.0.x` or `9.x`).

## 2. Close the Development Container

If you are using Visual Studio Code with Dev Containers, close VS Code to stop the development container.

> You can verify that the container is stopped in Docker Desktop under the **Containers** tab.

![Containers tab](./assets/containers.jpg)

## 3. Remove `package-lock.json`

Navigate to your `doubtfire-deploy` directory and delete the following file:

```
doubtfire-deploy/doubtfire-web/package-lock.json
```

![Delete package-lock.json](./assets/package-lock.json.jpg)

## 4. Open Docker Desktop

Launch Docker Desktop if it is not already running.

## 5. Delete Old Containers

In Docker Desktop, go to the **Containers** tab. Delete any containers with the image name pattern `lmsdoubtfire/...`.

![Delete containers](./assets/Containers2.jpg)

## 6. Delete Docker Volumes

In Docker Desktop, navigate to the **Volumes** tab and delete all volumes.

![Delete volumes](./assets/Volumes.jpg)

## 7. Update `package.json` (Before Starting the Container)

**Do not start your development container yet.**

Open `doubtfire-deploy/doubtfire-web/package.json` and make the following changes:

- Change the dependency version for `ng2-pdf-viewer` from `^10.2` to `10.2.2`.

![ng2-pdf-viewer version](./assets/ng2.jpg)

- Update the `ng serve` script to use polling:

Change `ng serve` to `ng serve --poll=2000`.

![ng serve script](./assets/serve.jpg)

## 8. Restart the Development Container

Once the above steps are complete, restart your development container using Dev Containers in VS Code.

![Restart dev container](./assets/devcontainer.jpg)

---

## Final Notes

Maintaining branch consistency across all three repositories is essential. Repeat these steps each time you switch between the 8.0.x and 9.x branches. Most development should occur on the 9.x branch.
Binary file added src/content/docs/setup/assets/Containers2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/content/docs/setup/assets/Volumes.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/content/docs/setup/assets/containers.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/content/docs/setup/assets/devcontainer.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/content/docs/setup/assets/images.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/content/docs/setup/assets/ng2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/content/docs/setup/assets/package.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/content/docs/setup/assets/serve.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.