Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update development steps in readme #328

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,23 @@ with the docker-compose.yml from this repository.

### Prerequisites

For frontend:
#### For frontend

- [Node.js](https://nodejs.org/en/download) (includes npm)
- [Mockoon](https://mockoon.com/download/#download-section)

For backend
#### For backend

- [Python 3.12](https://www.python.org/downloads/)
- [UV](https://docs.astral.sh/uv/getting-started/installation/#standalone-installer)
- [Docker](https://www.docker.com/get-started/)

On Linux you must instal the mysql dev binaries to be able to build the `mysqlclient` python distribution.

- Debian / Ubuntu: `apt-get install default-libmysqlclient-dev`
- Red Hat / CentOS: `yum install mysql-devel`
- Arch: `pacman -S mysql`

Comment on lines +35 to +40
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as additional information, I recently learned there's a proposal to solve this need: https://peps.python.org/pep-0725/

### Installation

1. Fork the project:\
Expand Down Expand Up @@ -67,12 +73,14 @@ For backend

```shell
cd canopeum_backend
docker compose up
# docker compose up # SEE NOTE BELOW !
uv sync --locked
uv run manage.py initialize_database
uv run manage.py runserver
```

Note: The docker compose file has bee updated for production deployment a while ago and no alternative has been created for local development. We currently use the `start-local-env.ps1` script with option `2: Run MySQL container`. If anyone wants to contribute restoring a simple docker command for dev, it would be more than welcome.

5. Set up React frontend:

```shell
Expand Down Expand Up @@ -178,6 +186,8 @@ If you save a modification to the `.nswag` file, DO NOT INCLUDE THE LOCAL COPY O

## Deployments

Whenever changes are pushed to the main branch, a build is automatically triggered and a container package pushed to <https://github.com/orgs/BesLogic/packages?repo_name=releaf-canopeum>. An administrator must then navigate to `/#!/1/docker/stacks/releaf-canopeum?id=11&regular=true` on our portainer instance and press "Pull and redeploy".
Whenever changes are pushed to the main branch, a build is automatically triggered and a container package pushed to <https://github.com/orgs/BesLogic/packages?repo_name=releaf-canopeum>.

You can also trigger a manual package build by using the "Run workflow" button at <https://github.com/BesLogic/releaf-canopeum/actions/workflows/canopeum_deploy.yml>.

You can also trigger a manual package build by using the "Run workflow" button at <https://github.com/BesLogic/releaf-canopeum/actions/workflows/canopeum_deploy.yml>. We'd prefer this to be the only action necessary for a deployment, so that any maintainer on GitHub could redeploy, but our automated detection on portainer currently isn't working.
<!--- If the deployment is not reflected whithin the next 5 mintues, an administrator may try navigating to `/#!/1/docker/stacks/releaf-canopeum?id=11&regular=true` on our portainer instance and press "Pull and redeploy". -->