An example app for having python code dockerized connected to one service. In this proof of concept we connect to postgresql database, using the dataset library.
You just have to bring the containers up with compose:
docker-compose up
If you want to check tables after launch you can access
a postgresql shell like explained in testing.sh
Accessing a python shell instead would require you to:
docker-compose exec app ash
$ ipython
- You can force the python container to do nothing
by changing the
command
option inside thedocker-compose.yml
file. - You can play with
dataset
by using the previous step and opening ipython.
docker-compose down -v