Update Docker configuration: change Docker Compose version to 3.8, enhance web service setup with context and dockerfile specifications, add volume and environment variables for Flask development, and modify Dockerfile to use Python 3.11 and improve file copying and command execution.

This commit is contained in:
2025-04-20 19:22:08 +01:00
parent f1f4870989
commit a073b09115
2 changed files with 18 additions and 8 deletions

View File

@@ -1,10 +1,12 @@
FROM python:3.9-slim-buster
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY website .
COPY . .
CMD ["python", "app.py"]
EXPOSE 5000
CMD ["python", "website/app.py"]

View File

@@ -1,7 +1,15 @@
version: "3.9"
version: '3.8'
services:
web:
build: .
build:
context: .
dockerfile: Dockerfile
ports:
- "5000:5000"
restart: always
volumes:
- .:/app
environment:
- FLASK_ENV=development
- FLASK_DEBUG=1
command: python website/app.py