python postgresql pgadmin for the spanglish command line script
272
A basic local python script that has a quiz section to ask about Spanish Words & sentences.
1- Pull the image from dockerhub after logging in from the command line using the folowing command: $ docker pull onha2001/spanglishscript:latest.
2- Run the image containers with the command $ docker-compose up .
3- The credentials to connect with the database and pgadmin are in the docker-compose.yml file. When modied, change the credentials in the config.py file. Otherwise the script will not be able to connect with the database.
4- The database schema file is included.
5- Access the script by connecting to it's container.
6- Run editor.py script to add words or sentences.
7- Run quiz.py to start the quiz questions.
To use the pgadmin interface after runing its container, do the following:
a- open the browser with the url localhost:8080 .
b- login with the credentials set in the docker-compose.yml file.
c- create a new connection to the postgres server.
d- use the Gateway Ipaddress of postgres container.
e- to get the Gateway IPAddress, inspect the postgres <containername>.
f- when the connection is established, create the database spanglish_script .
g- the database schema.sql file is included in the spanglish folder.
Content type
Image
Digest
Size
328.6 MB
Last updated
over 5 years ago
docker pull onha2001/spanglishscript