# Installation and Deployment **Please note** This is the documentation on how to install a DataMeta **server**. If you do not intend to operate your own DataMeta server but are interested in the DataMeta client, please refer to the corresponding section of the manual. ## Docker Compose Minimal ⚠️ Missing documentation ## Docker Compose HTTPS ⚠️ Missing documentation ## Native Installation Install dependencies, e.g. via [brew](https://brew.sh/). ``` brew install postgresql memcached libmemcached npm ``` Register postgresql as a service ``` brew services start postgresql ``` Clone this repository: ``` git clone https://github.com/ghga-de/datameta.git ``` Change directory into your newly created project if not already there. Your current directory should be the same as this README.md file and setup.py. ``` cd datameta ``` Create a Python virtual environment, if not already created. This can be done via `venv`: ``` python3 -m venv ``` or `conda`: ``` conda create -y -n 'python>3' ``` Activate the environment With `venv` ([docs](https://docs.python.org/3/tutorial/venv.html)): ``` source /bin/activate ``` With conda ``` conda activate ``` Upgrade packaging tools, if necessary. ``` pip install --upgrade pip setuptools ``` Install NPM dependencies ``` npm install --prefix datameta/static/ ``` Install the project in editable mode with its testing requirements. ``` pip install -e ".[testing]" ``` Create a postgresql database, then add the path to the database to the `development.ini` found in `datameta/config`, e.g. `sqlalchemy.url = postgresql://localhost/`. A copy of the `development.ini` can be placed at an arbitrary location named `/path/to/config/` in the following. ``` createdb ``` Initialize the database using Alembic. ``` /bin/alembic -c /development.ini upgrade head ``` Load default data into the database using a script. Change the initial user and group information to your requirements. ``` /bin/initialize_datameta_db \ -c /development.ini \ --initial-user-fullname "First User Fullname" \ --initial-user-email "first@user.email" \ --initial-user-pass "initialPassword" \ --initial-group "My Organization" ``` Run your project's tests. ``` /bin/pytest ``` Start the `memcached` process. ``` nohup memcached & ``` Run your project. ``` /bin/pserve /path/to/config/development.ini ```