diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bc2c747 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +__pycache__/ +*.py[cod] +*$py.class +.vscode/ +.idea +*.env +*.env.docker +/apps/*/migrations/ +/static/ diff --git a/DockerFile b/DockerFile new file mode 100644 index 0000000..f6857b8 --- /dev/null +++ b/DockerFile @@ -0,0 +1,7 @@ +FROM python:3.11 +ENV PYTHONDONTWRITEBYTECODE 1 +ENV PYTHONUNBUFFERED 1 +WORKDIR /backend +COPY requirements.txt . +RUN pip install -r requirements.txt +COPY . . \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..081a85c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,24 @@ +services: + db: + image: postgres:15 + env_file: + - .env + ports: + - "5432:5432" + volumes: + - postgres_data:/var/lib/postgresql/data + + ecommerce-backend: + build: . + command: python manage.py runserver 0.0.0.0:8000 + volumes: + - .:/backend + ports: + - "8000:8000" + depends_on: + - db + env_file: + - .env + +volumes: + postgres_data: \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..215b00d --- /dev/null +++ b/requirements.txt @@ -0,0 +1,15 @@ +Django==4.2.7 +djangorestframework==3.14.0 +djangorestframework-simplejwt==5.3.0 +djangorestframework-camel-case==1.4.2 +django-cors-headers==4.3.1 +django-import-export==3.0.1 +drf-yasg==1.21.7 +gunicorn==21.2.0 +requests==2.31.0 +psycopg2-binary==2.9.9 +PyJWT==2.8.0 +django-environ==0.9.0 +cryptography==44.0.2 +cron-descriptor==1.4.0 +django-filter==25.1 \ No newline at end of file