- Node 16
- npm 7
- Postgres 12
- Redis 6
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;
npm run dev
npm run build
Medplum recommends Docker images for production deployment.
The ../scripts/deploy-server.sh
script does the following:
- Creates a
.tar.gz
file with all files necessary to seed the Docker image - Runs
docker build
to build the Docker images - Runs `docker
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
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
To run the tests, simply issue the command:
npm run test