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

Upgrading mongoose version to 8.x #238

Merged
merged 7 commits into from
Sep 4, 2024
Merged
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: 4 additions & 4 deletions .github/workflows/backend-ci-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ jobs:

strategy:
matrix:
node-version: [ 18.x, 20.x ]
node-version: [ 18.x, 20.x, 22.x ]

defaults:
run:
working-directory: ./backend

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
- run: npx @pkgjs/support validate
# - run: npx @pkgjs/support validate
- run: node_modules/nyc/bin/nyc.js report --reporter=lcovonly
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/frontend-ci-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ jobs:

strategy:
matrix:
node-version: [ 18.x, 20.x ]
node-version: [ 18.x, 20.x, 22.x ]

defaults:
run:
working-directory: ./frontend

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run test -- --coverage
- run: npx @pkgjs/support validate
# - run: npx @pkgjs/support validate
- run: npm run build
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
Expand Down
39 changes: 30 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,43 @@ MongoDB is deployed with persistence and replicas: this is where todo items are
Tested using the Kubernetes service provided by [Docker for Desktop on Mac](https://docs.docker.com/docker-for-mac/kubernetes/).

## Quickstart for local development
- Deploy MongoDB as a Docker container or on Kubernetes first
- `cd backend`
- `npm install`
- `npm start`
- `cd ../frontend`
- `npm install`
- `npm start`

- Start a containerized MongoDB

```sh
podman run --name mongodb -d -p 27017:27017 mongo:7
```

- Start the backend service

```sh
cd backend
npm install
npm start
```

- Start the frontend service

```sh
cd ../frontend
npm install
npm start
```

## Quickstart for Podman

- `podman build -f frontend/Dockerfile -t frontend:v1.0.0 frontend`
- `podman build -f backend/Dockerfile -t backend:v1.0.0 backend`
- `podman pull mongo`
- `podman pull mongo:7`
- `podman network create mern-workshop`
- `podman run -d --net mern-workshop --name mern-mongo mongo`
- `podman run -d --net mern-workshop --name mern-mongo mongo:7`
- `podman run -d -p 30555:30555 --net mern-workshop -e MONGO_URL=mern-mongo --name mern-backend backend:v1.0.0`
- `podman run -p 3001:80 frontend:v1.0.0`

Visit the application on `localhost:3001`

## Quickstart for Podman-Compose

You can use podman-compose to quickly deploy multiple services at once.

- Install podman compose https://github.com/containers/podman-compose#installation
Expand Down Expand Up @@ -58,9 +77,11 @@ services:
ports:
- 27017:27017
```

- Run `podman-compose up` to deploy the services.

## Quickstart for Kubernetes

Requires building the images first, see the quickstart for Docker section.

- Set your Kubernetes context so you're pointing to a Kubernetes environment.
Expand Down
Loading
Loading