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:
12
Dockerfile
12
Dockerfile
@@ -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"]
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user