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
35 changes: 35 additions & 0 deletions docs/development-setup/running-locally.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Running Locally

How to run the app locally:

1. Complete the steps in:
1. [Local Development Environment](./local-development-environment.md)
1. [Sandbox Environment](./sandbox.md)
1. Ensure the sandbox environment is running
1. `make install`
1. Login to the Openshift project `101ed4-prod` on the CLI
1. `make copy-db`
1. `make dev`

## Troubleshooting

### Canvas error

**Problem**

The `make install` command gives the error:

```
cd app/node_modules/.pnpm/canvas@3.2.0/node_modules/canvas &&\
pnpm add -D node-gyp &&\
pnpm exec node-gyp rebuild
bash: line 0: cd: app/node_modules/.pnpm/canvas@3.2.0/node_modules/canvas: No such file or directory
make: *** [canvas-install] Error 1
```

**Solution**

1. Comment out the `install: canvas-install` section in the [Makefile](https://github.com/bcgov/platform-services-registry/blob/main/Makefile)
1. `make install`
1. Uncomment the `install: canvas-install` section
1. `make install`
32 changes: 29 additions & 3 deletions docs/development-setup/sandbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,35 @@ The development sandbox serves as an isolated environment for local development

## Pre-requisites

- **[Docker Desktop](https://www.docker.com/products/docker-desktop/)** must be installed and running on your machine.
- For Windows, WSL2 is required.
- For macOS (Intel or Apple Silicon), ensure Docker Desktop is configured to use the appropriate architecture.
Due to BC Government procurement restrictions, Docker Desktop is not permitted. However, the following alternatives are approved:

- Docker Engine (with Docker CLI)
- Podman
- Rancher Desktop

### Docker Setup

=== "Mac"

1. `brew install docker`
1. `brew install docker-compose`
1. `brew install docker-buildx`
1. Add symlinks in `~/.docker/cli-plugins`
1. `ln -s $HOMEBREW_PREFIX/lib/docker/cli-plugins/docker-buildx docker-buildx`
1. `ln -s $HOMEBREW_PREFIX/lib/docker/cli-plugins/docker-compose docker-compose`
1. Login to docker
1. `docker login`
1. Start VM. Example (using podman):
1. `podman machine init`
1. `podman machine start`

=== "Windows"

Refer to these blog posts on how to install Docker without Docker Desktop:

* [How to install wsl2 ubuntu + docker + docker-compose](https://gist.github.com/martinsam16/4492957e3bbea34046f2c8b49c3e5ac0)
* [Mastering Docker on WSL2: A Complete Guide Without Docker Desktop](https://medium.com/h7w/mastering-docker-on-wsl2-a-complete-guide-without-docker-desktop-19c4e945590b)
* [Installing Docker, and Docker-Compose, in WSL2/Ubuntu on Windows](https://codingwithcalvin.net/installing-docker-and-docker-compose-in-wsl2ubuntu-on-windows/)

## Getting Started

Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ nav:
- development-setup/local-development-environment.md
- development-setup/chartjs-canvas.md
- development-setup/sandbox.md
- development-setup/running-locally.md
- development-setup/onboarding-offboarding.md
- development-setup/react-email.md
- development-setup/resource-metrics.md
Expand Down
34 changes: 23 additions & 11 deletions sandbox/docker-compose-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,27 @@ services:
# See https://github.com/zcube/bitnami-compat/pkgs/container/bitnami-compat%2Fmongodb
image: ghcr.io/zcube/bitnami-compat/mongodb:6.0-debian-11-r64@sha256:42b6d774c37dab8cb2a55a8a476281e56bb0eedd707c75956c7061c5904a1859

# keycloak:
# platform: linux/arm64
keycloak:
platform: linux/arm64

keycloak-provision:
platform: linux/arm64

m365proxy:
platform: linux/arm64
container_name: m365proxy
build:
context: ./m365proxy
dockerfile: Dockerfile.arm64
stdin_open: true
ports:
- 8000:8000

# m365proxy:
# platform: linux/arm64
# container_name: m365proxy
# build:
# context: ./m365proxy
# dockerfile: Dockerfile.arm64
# stdin_open: true
# ports:
# - 8000:8000
m365mock:
platform: linux/arm64

ches-mock:
platform: linux/arm64

nats-provision:
platform: linux/arm64
Loading