psychemedia / ou-tm351

WIP site - issue tracker
7 stars 7 forks source link

Running the TM351 environment in a single container #4

Open psychemedia opened 6 years ago

psychemedia commented 6 years ago

To run the TM351 environment in Binderhub, we need it in a single container.

One of the main questions is, what permissions do we need to set things up under and how do we guarantee that notebook and DBMS servers run appropriately, or how do we endure that the notebook user can start and stop the DBMS servers?

Example Dockerfiles:

psychemedia commented 6 years ago

So... at the moment this requires the user starting and stopping the db server:

!echo redspot | sudo -S service postgresql start

from sqlalchemy import create_engine

PGCONN = PGCONN='postgresql://postgres:postgres@localhost:5432'

engine = create_engine(PGCONN)

from pandas import read_sql_query as psql

psql("SELECT table_schema,table_name FROM information_schema.tables \
    ORDER BY table_schema,table_name LIMIT 3;", engine)

Could fix this with a toolbar button; even nicer if toolbar button shows is a toggle that shows current postgres server state (started, stopping, stopped, restarting).

Mongodb should be easy enough to handle similarly in dockerfile?

Just need openrefine now, and I think one of Binderhub devs was looking at that? https://gitter.im/jupyterhub/binder?at=5a2316603a80a84b5bac40b3