Skip to content

Latest commit

 

History

History
86 lines (57 loc) · 1.6 KB

README.md

File metadata and controls

86 lines (57 loc) · 1.6 KB

Medplum Server

Prerequisites

  • Node 16
  • npm 7
  • Postgres 12
  • Redis 6

Database

Create a "medplum" user:

CREATE USER medplum WITH PASSWORD 'medplum';

Create a "medplum" database:

CREATE DATABASE medplum;
GRANT ALL PRIVILEGES ON DATABASE medplum TO medplum;

Create a "medplum_test" database:

CREATE DATABASE medplum_test;
GRANT ALL PRIVILEGES ON DATABASE medplum_test TO medplum;

Dev server:

npm run dev

Production build

npm run build

Docker

Medplum recommends Docker images for production deployment.

The ../scripts/deploy-server.sh script does the following:

  1. Creates a .tar.gz file with all files necessary to seed the Docker image
  2. Runs docker build to build the Docker images
  3. Runs `docker

Troubleshooting

Medplum uses the buildx command, which is currently an "experimental" Docker feature.

First, make sure that experimental features are enabled.

You may encounter the following error:

ERROR: multiple platforms feature is currently not supported for docker driver. Please switch to a different driver (eg. "docker buildx create --use")

If so, create a new multiarch driver:

docker buildx create --name multiarch --driver docker-container --use

Testing

Seeding the database

Before running npm run test in packages/server, you will want to make sure the database is seeded. You are able to seed the database before running the tests by running:

npm run test:seed:parallel

Running the tests

To run the tests, simply issue the command:

npm run test