- Bootstrap the DB
$ docker-compose up -d db
$ docker-compose run --rm flaskapp /bin/bash -c "cd /opt/services/flaskapp/src && python -c 'import database; database.init_db()'"
- Bring up the cluster
$ docker-compose up -d
- Launch bash in the container
$ docker exec -it nginx-flask-postgres-docker-compose-example_flaskapp_1 /bin/bash
browse to
$ /opt/services/flaskapp/src/saver
and run
$ python global.py all
for separate running use following options:
brand
- for parsing brands and families
model
- for parsing car models fro the each family
object
- for generate many-to-many table
item
- for parsing items
If you have a problems with modules etc, try to set env variable $PYTHONPATH
:
$ export PYTHONPATH="/opt/services/flaskapp/src"