Skip to content

Commit

Permalink
chore: docs (#25)
Browse files Browse the repository at this point in the history
* chore: docs

* fix: mermaid

* chore: updated images

* fix: image rendering and some rearrangement

* chore: more changes

* chore: more docs

* chore: enable compose logging, during debug mode
  • Loading branch information
mishraomp authored Dec 23, 2024
1 parent 872b806 commit 05d9be7
Show file tree
Hide file tree
Showing 19 changed files with 39 additions and 5 deletions.
Binary file removed .github/graphics/analysis.png
Binary file not shown.
Binary file removed .github/graphics/branch-code-results.png
Binary file not shown.
Binary file removed .github/graphics/branch-protection.png
Binary file not shown.
Binary file removed .github/graphics/demo-label.png
Binary file not shown.
Binary file removed .github/graphics/demo-workflow.png
Binary file not shown.
Binary file removed .github/graphics/deploymentUpdate.png
Binary file not shown.
Binary file removed .github/graphics/merge.png
Binary file not shown.
Binary file removed .github/graphics/mergeNotification.png
Binary file not shown.
Binary file removed .github/graphics/packages.png
Binary file not shown.
Binary file removed .github/graphics/pr-cleanup.png
Binary file not shown.
Binary file removed .github/graphics/pr-close.png
Binary file not shown.
Binary file added .github/graphics/pr-open.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 removed .github/graphics/pr-open.png
Binary file not shown.
Binary file removed .github/graphics/pr-validate.png
Binary file not shown.
Binary file removed .github/graphics/scheduled.png
Binary file not shown.
Binary file removed .github/graphics/schemaspy.png
Binary file not shown.
Binary file removed .github/graphics/template.png
Binary file not shown.
3 changes: 3 additions & 0 deletions .github/workflows/.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ jobs:
FRONTEND_IMAGE: ghcr.io/${{ github.repository }}/frontend:${{ inputs.tag }}
run: docker compose up -d --wait
continue-on-error: true
- name: Docker Compose Logs
if: ${{ runner.debug == '1' }}
run: docker compose logs
- name: Cache Playwright Browsers
uses: actions/cache@v4
id: playwright-cache
Expand Down
41 changes: 36 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# quickstart-aws-containers
⚠️ This is very much in WIP phase. Though the code and workflows can be used to deploy to AWS⚠️

[![Merge](https://github.com/bcgov/quickstart-aws-containers/actions/workflows/merge.yml/badge.svg)](https://github.com/bcgov/quickstart-aws-containers/actions/workflows/merge.yml)
[![PR](https://github.com/bcgov/quickstart-aws-containers/actions/workflows/pr-open.yml/badge.svg)](https://github.com/bcgov/quickstart-aws-containers/actions/workflows/pr-open.yml)
[![PR Validate](https://github.com/bcgov/quickstart-aws-containers/actions/workflows/pr-validate.yml/badge.svg)](https://github.com/bcgov/quickstart-aws-containers/actions/workflows/pr-validate.yml)
[![CodeQL](https://github.com/bcgov/quickstart-aws-containers/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/bcgov/quickstart-aws-containers/actions/workflows/github-code-scanning/codeql)
[![Pause AWS Resources](https://github.com/bcgov/quickstart-aws-containers/actions/workflows/pause-resources.yml/badge.svg)](https://github.com/bcgov/quickstart-aws-containers/actions/workflows/pause-resources.yml)
[![Pause AWS Resources](https://github.com/bcgov/quickstart-aws-containers/actions/workflows/pause-resources.yml/badge.svg)](https://github.com/bcgov/quickstart-aws-containers/actions/workflows/pause-resources.yml)
# Quickstart for AWS using Aurora Serverless v2 (Postgis) , ECS Fargate and CloudFront ⚠️DRAFT⚠️
## Prerequisites

- BCGOV AWS account with appropriate permissions
Expand Down Expand Up @@ -38,15 +42,15 @@
- **README.md**: Project documentation.
- **package.json**: Node.js monorepo configuration for eslint and prettier.

# Runnin Locally
# Running Locally
## Running Locally with Docker Compose

To run the entire stack locally using the `docker-compose.yml` file in the root directory, follow these steps:

1. Ensure Docker (or Podman) is installed and running on your machine.
2. Navigate to the root directory of the project:
```sh
cd /c:/projects/NRS/quickstart-aws-containers
cd <checkedout_repo_dir>
```
3. Build and start the containers:
```sh
Expand All @@ -58,6 +62,33 @@ To stop the containers, press `Ctrl+C` in the terminal where `docker-compose` is
```sh
docker-compose down
```
## Running Locally without Docker (Complex)
Prerequisites:

1. Install JDK 17 and above.
2. Install Node.js 22 and above.
3. Install Postgres 16.4 with Postgis extension.
4. Download flyway.jar file
Once all the softwares are installed follow below steps.

1. Run Postgres DB (better as a service on OS).
2. Run flyway migrations (this needs to be run everytime changes to migrations folder happen)
```sh
java -jar flyway.jar -url=jdbc:postgresql://$posgtres_host:5432/$postgres_db -user=$POSTGRES_USER -password=$POSTGRES_PASSWORD -baselineOnMigrate=true -schemas=$FLYWAY_DEFAULT_SCHEMA migrate
```
3. Run backend from root of folder.
```sh
cd backend
npm run start:dev or npm run start:debug
```
4. Run Frontend from root of folder.
```sh
cd frontend
npm run dev
```

# Deploying to AWS
1. Please follow the wiki link for AWS deployment [setup](https://github.com/bcgov/quickstart-aws-containers/wiki/Deploy-To-AWS-Using-Terraform)

## Pull Request Workflow
![Pull Request Workflow](./.github/graphics/pr-open.jpg)

0 comments on commit 05d9be7

Please sign in to comment.