File tree Expand file tree Collapse file tree 3 files changed +45
-0
lines changed
Expand file tree Collapse file tree 3 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM python:3.7-alpine
2+
3+ RUN apk add --no-cache --virtual .build-deps gcc postgresql-dev musl-dev python3-dev
4+ RUN apk add libpq
5+
6+ COPY requirements.txt /tmp
7+ RUN pip install -r /tmp/requirements.txt
8+
9+ RUN apk del --no-cache .build-deps
10+
11+ RUN mkdir -p /code
12+ COPY *.py /code/
13+ WORKDIR /code
14+ ENV FLASK_APP=flask_app.py FLASK_DEBUG=1 PYTHONUNBUFFERED=1
15+ CMD flask run --host=0.0.0.0 --port=80
Original file line number Diff line number Diff line change 1+ version : " 3"
2+ services :
3+
4+ app :
5+ build :
6+ context : .
7+ dockerfile : Dockerfile
8+ depends_on :
9+ - postgres
10+ environment :
11+ - DB_HOST=postgres
12+ - DB_PASSWORD=abc123
13+ volumes :
14+ - ./:/code
15+ ports :
16+ - " 5005:80"
17+
18+
19+ postgres :
20+ image : postgres:9.6
21+ environment :
22+ - POSTGRES_USER=allocation
23+ - POSTGRES_PASSWORD=abc123
24+ ports :
25+ - " 54321:5432"
26+
Original file line number Diff line number Diff line change 1+ pytest
2+ sqlalchemy
3+ flask
4+ psycopg2
You can’t perform that action at this time.
0 commit comments