New commit with working container containing functional flask running

This commit is contained in:
Henrik Corneliussen
2026-05-06 23:24:57 +02:00
parent ebcd2d5e43
commit d7544c2156
3 changed files with 37 additions and 3 deletions

12
Dockerfile Normal file
View 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
View 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"

View File

@@ -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