Public Repository

Last pushed: 6 months ago
Short Description
psycopg2 2.6.2 installed on drewantech/flask_sqlalchemy:1.0.0
Full Description

To run: docker run --net=host drewantech/flask_sqlalchemy_psycopg2:1.0.0

The above command launches the 'test_psycopg2.py' file which serves a webpage at 'http://127.0.0.2:5001/' which prints 'psycopg2 version installed: 2.6.2 (dt dec pq3 ext lo64)' on the '/' url.
To change ip use '--host=#.#.#.#' argument. For example:
docker run --net=host drewantech/flask:1.0.0 --host=127.0.0.1

To change port use '--port=#' argument. For example:
docker run --net=host drewantech/flask:1.0.0 --port=5000

See flask documentation for additional command line arguments.

Image runs with use of 'python_user' in directory of '/home/python_user'. 'test_psycopg2.py' is installed in the '/home/python_user' directory. To install own webserver, it is recommended to delete the '/home/python_user/test_psycopg2.py' file and install the webserver file. Additionally the container environment variable FLASK_APP will need to be updated to point to the new web server's installation location.

Docker Pull Command
Owner
drewantech