Docker-compose to use compound database easily.
PostgreSQL with RDKit database cartridge for compound database
- PostsgreSQL (version 9.5)
- RDKit database cartridge (latest)
Jupyter Notebook for creating database table and using database with Python
- Python (version 3.6.0)
- SQLAlchemy
- Pillow (version 4.3.0)
- RDKit (version 2017.03.1)
- razi (latest)
git clone https://github.com/yamasakih/docker-compose-radi
cd docker-compose-django-radi
docker-compose up -d
> $ docker-compose up -d
Creating network "dockercomposerazi_default" with the default driver
Creating dockercomposerazi_db_1 ...
Creating dockercomposerazi_db_1 ... done
Creating dockercomposerazi_web_1 ...
Creating dockercomposerazi_web_1 ... done
Please access http://0.0.0.0:8888
or http://localhost:8888
, then you can run Jupyter Notebook.
If you can't, please restart docker-compose.
> $ docker-compose restart
Restarting dockercomposedjangordkit_web_1 ... done
Restarting dockercomposedjangordkit_db_1 ... done
If you want, create database by command createdb
.
You can use postgresql command by simply adding docker-compose exec db
at the beginning.
(Change YOUR_DATABASE_NAME to created database name)
> $ docker-compose exec db createdb -U postgres YOUR_DATABASE_NAME
Next, extend your database by command create extension rdkit
for using RDKit database cartridge.
You can use postgresql command by simply adding docker-compose exec db
at the beginning.
(Change YOUR_DATABASE_NAME to created database name or postgres (default database name))
> $ docker-compose exec db psql -U postgres -c 'create extension rdkit' YOUR_DATABASE_NAME
CREATE EXTENSION
This Docker-compose uses named volume.
If it becomes unnecessary, delete it with the following command.
> $ docker volume list
DRIVER VOLUME NAME
local dockercomposerazi_dbdata
> $ docker volume rm dockercomposerazi_dbdata
dockercomposerazi_dbdata
> $ docker volume list
DRIVER VOLUME NAME
For more information, please see tutorial.