From 83f5b6f839ef98db3a26148ab46b01d39d704abb Mon Sep 17 00:00:00 2001 From: andrei Date: Sat, 21 Dec 2024 10:11:27 +0500 Subject: [PATCH] ._. --- app/Dockerfile | 15 +++++++++++++++ docker-compos.yaml | 19 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 app/Dockerfile create mode 100644 docker-compos.yaml diff --git a/app/Dockerfile b/app/Dockerfile new file mode 100644 index 0000000..e64a001 --- /dev/null +++ b/app/Dockerfile @@ -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"] \ No newline at end of file diff --git a/docker-compos.yaml b/docker-compos.yaml new file mode 100644 index 0000000..f0a2f36 --- /dev/null +++ b/docker-compos.yaml @@ -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" \ No newline at end of file