This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import psycopg2 | |
class query(): | |
def __init__(self): | |
"""Set credential information here, or pass the information as | |
arguments to the class, or read your credentials from environment | |
variables. Anyway you choose to handle crendtials, pass them to these | |
class variables.""" | |
self.DB_USER = '<username>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.7.3-alpine3.9 | |
RUN apk add build-base | |
RUN apk update && apk add postgresql-dev gcc python3-dev musl-dev | |
COPY requirements.txt /myapp/requirements.txt | |
COPY Makefile /myapp/Makefile | |
RUN python3 -m pip install virtualenv | |
RUN cd myapp && make venv |