This commit is contained in:
Андрей Дувакин 2024-12-21 10:11:27 +05:00
parent 3f5b2528bf
commit 83f5b6f839
2 changed files with 34 additions and 0 deletions

15
app/Dockerfile Normal file
View File

@ -0,0 +1,15 @@
FROM python:3.10-slim
RUN apt-get update && apt-get install -y \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
CMD ["python", "main.py"]

19
docker-compos.yaml Normal file
View File

@ -0,0 +1,19 @@
version: '3.8'
services:
app_api-logistics:
build:
context: ./app
environment:
- DATABASE_URL=your-secret-key
restart: always
ports:
- "5002:5000"
deploy:
resources:
limits:
memory: 512M
cpus: "0.5"
reservations:
memory: 128M
cpus: "0.2"