diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..dbb263f --- /dev/null +++ b/.dockerignore @@ -0,0 +1,9 @@ +.git +__pycache__ +*.pyc +.env +venv +.venv +db.sqlite3 +static +media \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a77af59 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +tienda/static/media +db.sqlite3 +.venv diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c9b7ee2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM python:3.14-slim + +ENV PYTHONDONTWRITEBYTECODE=1 +ENV PYTHONUNBUFFERED=1 +ENV DEBIANFRONTEND=noninteractive +WORKDIR /app + +RUN apt update && apt install -y build-essential figlet libpq-dev && rm -rf /var/lib/apt/lists/* + +COPY requirements.txt /app/ +RUN pip install --no-cache-dir -r requirements.txt + +COPY . /app/ +RUN chmod +x /app/entrypoint.sh + +EXPOSE 8000 + +CMD ["/app/entrypoint.sh"] \ No newline at end of file diff --git a/db.sqlite3 b/db.sqlite3 deleted file mode 100644 index df7b118..0000000 Binary files a/db.sqlite3 and /dev/null differ diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..1ee1d3d --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +figlet Proyecto MVC + +echo "Running DB migrations..." +python manage.py migrate +echo "Collecting STATIC..." +yes | python manage.py collectstatic + +echo "Running server!" + +gunicorn --bind 0.0.0.0:8000 proyecto.wsgi:application \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index c3793b0..e986b73 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,18 +1,26 @@ asgiref==3.11.0 certifi==2026.1.4 +cffi==2.0.0 charset-normalizer==3.4.4 +cryptography==46.0.4 Django==6.0.1 django-appconf==1.2.0 django-libsass==0.9 -django_compressor==4.6.0 django-redis==5.4.0 +django_compressor==4.6.0 +gunicorn==25.1.0 idna==3.11 libsass==0.23.0 +packaging==26.0 +paypalrestsdk==1.13.3 pillow==12.1.0 +pycparser==3.0 +pyOpenSSL==25.3.0 rcssmin==1.2.2 redis==5.2.1 requests==2.32.5 rjsmin==1.2.5 +six==1.17.0 sqlparse==0.5.5 stripe==14.3.0 typing_extensions==4.15.0