New commit with working container containing functional flask running
This commit is contained in:
12
Dockerfile
Normal file
12
Dockerfile
Normal file
@@ -0,0 +1,12 @@
|
||||
FROM python:3.11-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt gunicorn
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 5000
|
||||
|
||||
CMD ["gunicorn", "-b", "0.0.0.0:5000", "app:app"]
|
||||
18
compose.yml
Normal file
18
compose.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
services:
|
||||
flask:
|
||||
build: .
|
||||
ports:
|
||||
- "5001:5000"
|
||||
environment:
|
||||
DATABASE_URL: postgresql://postgres:postgres@db:5432/flaskdb
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
db:
|
||||
image: postgres:16
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: flaskdb
|
||||
ports:
|
||||
- "5432:5432"
|
||||
@@ -1,3 +1,7 @@
|
||||
Flask==1.1.2
|
||||
Werkzeug==1.0.1
|
||||
markupsafe==2.0.1
|
||||
blinker==1.9.0
|
||||
click==8.3.3
|
||||
Flask==3.1.3
|
||||
itsdangerous==2.2.0
|
||||
Jinja2==3.1.6
|
||||
MarkupSafe==3.0.3
|
||||
Werkzeug==3.1.8
|
||||
|
||||
Reference in New Issue
Block a user