Skip to content

An electronic lab notebook based on react and django.

License

Notifications You must be signed in to change notification settings

cheminfolab/flask

Repository files navigation

Installation

Install prerequisites:

  • conda
  • npm (node.js)

or

  • docker

Setting up the .backend.env file:

# .env
SECRET_KEY='<secret_key>'
DEBUG=False
ALLOWED_HOSTS='<allowed_host>, ...'

TIME_ZONE='Europe/Berlin'

POSTGRES_DB='flask_database'
POSTGRES_USER='admin'
POSTGRES_PASSWORD='<admin_password>'
POSTGRES_HOST='localhost'
POSTGRES_PORT='5432'

#CORS_ALLOW_ALL_ORIGINS=True
CORS_ALLOWED_ORIGINS='<allowed_origins>, ... '

Django

Setting up the environment:

conda install -f environment.yml
conda activate flask

React

In the frontend/ directory, run:

npm install

Running the ELN instance

Backend

docker compose up -d --build

or with a respective .env file:

docker compose --env-file .backend.env up -d --build

Stop running the Postgres Instance

docker compose down

Frontend

In frontend/, run:

npm start