Skip to content

Latest commit

 

History

History
94 lines (66 loc) · 2.34 KB

CONTRIBUTING.md

File metadata and controls

94 lines (66 loc) · 2.34 KB

Platformatic

Running and Developing DB

Preparation

  1. Clone this repository
  2. Install pnpm npm i pnpm --location=global
  3. Install dependencies for root project: pnpm i
  4. Install docker with Docker Desktop or Colima

Start the RDBMS

We use Docker to start all the databases we develop against.

On Linux, execute: docker compose up

On Intel Macs: docker compose up -f docker-compose-mac.yml

On Apple Silicon Macs: docker compose up -f docker-compose-apple-silicon.yml

Start platformatic db

Create directories to work from:

mkdir -p my-demo/migrations

Install all dependencies:

pnpm i 

The CLI package is now available at ./node_modules/.bin/platformatic. Use pnpm link to use platformatic everywhere.

(cd packages/cli && pnpm link)

Run dashboard development server

Use the command

npm run dashboard:start

This will start a webpack server on port 3000 by default, with watcher and hot-reload (as a standard create-react-app application).

Note that GraphiQL will not work because platformatic-db has not been started yet.

Run platformatic-db service

First build the dashboard for production with the command

pnpm run dashboard:build

This will create compressed files and assets under packages/dashboard/build directory. To run the service:

platformatic db

This will load config from local directory (i.e using config file platformatic.db.json).

If you want to use another config file use the option --config=/path/to/some.json.

Testing

  1. Run docker
  2. Run npm run dashboard:build
  3. Run tests: npm test

Releasing

All platformatic modules share the same release number and are released in a single process. In order to avoid internal breakages, dependencies as part of this repository are using the workspace:* which will be replaced by precise versions during publish by pnpm.

The procedure to release is simple:

  1. Update the version of the root package.json
  2. run ./scripts/sync-version.sh
  3. run pnpm -r publish

Creating and merging a PR

On the top of the PR description, if this is a fix of a github issue, add:

fixes #issuenum 

When all checks are passed and the changes are approved, merge the PR with squash and merge option