0

when deploing my project on heroku with 125 mb ram , with 7$/month it works perfect, and when deploing on docker with server 16 ram and 6 vcpu, it works , buut every 15 or 30 minutes it is being like down , but itsnot . no error in logs, no error on containers log , I don't know where is the roblem is ? this is Dockerfile

FROM python:3.10.10-slim-buster
ENV PYTHONUNBUFFERED=1
RUN apt-get update && apt-get -y install libpq-dev gcc && pip install psycopg2
WORKDIR /django
COPY requirements.text requirements.text
COPY . .
RUN pip3 install -r requirements.text

and this is docker-compose

version: "3.9"
services:
  # Django Application
  app:
    build: .
    volumes:
      - .:/django
    ports:
      - 8000:8000
    image: app:django
    restart: always
    container_name: django_app
    command: python manage.py runserver 0.0.0.0:8000
    depends_on:
      - db

  # Database Postgres
  db:
    image: postgres
    restart: always
    volumes:
      - .postgres_data:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=postgres
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
    container_name: postgres_db
volumes:
  postgres_data:

no error on logs and at the moment that server goes down on browsers , but containers still working and without any error , this is resources , any help ?! enter image description here

ahmed403
  • 3
  • 3

0 Answers0