got basic connections working

history-download
will king 4 years ago
parent 3f4d73c33a
commit c43b5dbd06

@ -0,0 +1,11 @@
import psycopg2 as psyco
conn = psyco.connect(dbname="aact_db", user="access", host="localhost", password="access")
curse = conn.cursor()
curse.execute("SELECT * FROM testing")
print(curse.fetchall())
curse.close()
conn.close()

@ -10,7 +10,7 @@ services:
POSTGRES_PASSWORD: root POSTGRES_PASSWORD: root
POSTGRES_DB: aact_db POSTGRES_DB: aact_db
ports: ports:
- "3000:5432" #host:container - "5432:5432" #host:container
volumes: #host:container is the format. volumes: #host:container is the format.
#pull in a single file #pull in a single file
#- $HOME/research/ClinicalTrialsDataProcessing/PostgressDocker/infile:/infile #- $HOME/research/ClinicalTrialsDataProcessing/PostgressDocker/infile:/infile

Loading…
Cancel
Save