Skip to content

modalityone/modality-local-services

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Modality Local Services

This repository contains a Docker-based solution for running Postgres locally, as required by Modality. Install once, then start and stop as necessary during development. Additional notes are provided for connecting a Postgres client directly to the database.

INSTALLATION

1. Install Docker

Please install Docker Desktop on your local machine if you do not have it already. If using a Mac, the easiest way is to install using brew. Please provide Docker with a minimum of 8GB of RAM, ideally more.

2. Clone the repository

mkdir -vp modality-local-services
export MODALITY_LOCAL_SERVICES=${PWD}/modality-local-services
cd $MODALITY_LOCAL_SERVICES
git clone https://github.com/modalityone/modality-local-services.git .

3. Import SQL Setup Scripts

Locate the SQL setup scripts in the main Modality repository:

SQL setup scripts

And copy the scripts into the Postgres data directory:

$MODALITY_LOCAL_SERVICES/data/postgres/

4. Setup Environment Variables

Environment variables store the Postgres database name, username and password. Defaults are provided in the .env-template. Use this template file as the basis for your Docker-based configuration, by creating an .env file from it. You may leave the defaults, or provide new values accordingly:

cp .env-template .env
source .env # make the environment variables available to the shell

5. Build Postgres Container

docker-compose build --no-cache

DAILY USE

Start Postgres Container

docker-compose up

Stop Postgres Container

docker-compose down

DATABASE CLIENT CONNECTION

Postgres clients can connect to the running Postgres container using the following credentials (contained within the .env file):

  • Server: 127.0.0.1
  • Port: 5432
  • Database: modality
  • User: modality
  • Password: modality

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages