open-reaction-database / ord-schema

Schema for the Open Reaction Database
https://open-reaction-database.org
Apache License 2.0
95 stars 27 forks source link

Add docker-compose configuration for the editor #452

Closed skearnes closed 4 years ago

skearnes commented 4 years ago

Running docker-compose up starts two images: one containing a postgres database and the other containing the ORD web editor. The postgres database is exposed to the editor and can be accessed by connecting to ORD_EDITOR_DB with ORD_EDITOR_POSTGRES_PASSWORD. The postgres container writes to a mounted volume; this ensures that the database persists when restarting the image. On GCP, the mounted volume should be a persistent disk.

Also changes the current ORD_EDITOR_DB variable, which refers to the location of the local or mounted filesystem, to ORD_EDITOR_LOCAL.

codecov[bot] commented 4 years ago

Codecov Report

Merging #452 into main will not change coverage. The diff coverage is 83.33%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #452   +/-   ##
=======================================
  Coverage   76.11%   76.11%           
=======================================
  Files          21       21           
  Lines        2324     2324           
  Branches      483      483           
=======================================
  Hits         1769     1769           
  Misses        412      412           
  Partials      143      143           
Impacted Files Coverage Δ
editor/py/serve.py 79.72% <83.33%> (ø)
skearnes commented 4 years ago

Note that docker-compose will not be used for deployment on GCP. Instead, we will have a separate VM hosting the database that the frontend VM(s) can connect to. So this PR is really for unblocking local development.