Spaces:
Sleeping
Sleeping
Config Dockerfile cambio de imagen a debian 12
Browse files- Dockerfile +38 -14
Dockerfile
CHANGED
|
@@ -1,28 +1,52 @@
|
|
| 1 |
-
FROM
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
|
|
|
|
| 6 |
|
| 7 |
-
|
|
|
|
| 8 |
|
| 9 |
-
RUN
|
|
|
|
| 10 |
|
| 11 |
-
RUN
|
|
|
|
| 12 |
|
| 13 |
-
|
|
|
|
|
|
|
| 14 |
|
| 15 |
-
|
| 16 |
|
| 17 |
-
|
| 18 |
|
| 19 |
-
RUN
|
| 20 |
|
| 21 |
-
|
| 22 |
|
| 23 |
-
RUN
|
| 24 |
|
| 25 |
-
|
| 26 |
|
| 27 |
-
#
|
| 28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM debian:12.10
|
| 2 |
+
|
| 3 |
+
RUN apt -y update
|
| 4 |
+
RUN apt install -y python3 python3-pip python3-mysqldb
|
| 5 |
+
# python3-django
|
| 6 |
|
| 7 |
WORKDIR /app
|
| 8 |
|
| 9 |
+
COPY . .
|
| 10 |
+
WORKDIR /app
|
| 11 |
|
| 12 |
+
RUN chmod 777 ./requirements.txt
|
| 13 |
+
RUN python3 -m pip install -r requirements.txt
|
| 14 |
|
| 15 |
+
RUN chmod 777 ./tecnicas/migrations
|
| 16 |
+
RUN python3 manage.py migrate
|
| 17 |
|
| 18 |
+
RUN chmod 777 ./create_superuser.py
|
| 19 |
+
RUN python manege.py shell < create_superuser.py
|
| 20 |
|
| 21 |
+
CMD ["gunicorn", "cata_system.wsgi:tecnicas", "--bind", "0.0.0.0:7860"]
|
| 22 |
+
|
| 23 |
+
# python3 manage.py runserver 0:7860; \
|
| 24 |
|
| 25 |
+
# FROM python:3.11-slim
|
| 26 |
|
| 27 |
+
# WORKDIR /app
|
| 28 |
|
| 29 |
+
# RUN ls
|
| 30 |
|
| 31 |
+
# COPY requirements.txt .
|
| 32 |
|
| 33 |
+
# RUN pip install -r --upgrade pip
|
| 34 |
|
| 35 |
+
# RUN ls
|
| 36 |
|
| 37 |
+
# RUN pip install -r requirements.txt
|
| 38 |
+
|
| 39 |
+
# COPY . .
|
| 40 |
+
|
| 41 |
+
# RUN python manege.py migrate
|
| 42 |
+
|
| 43 |
+
# RUN python manage.py tailwind build
|
| 44 |
+
|
| 45 |
+
# RUN python manage.py collectstatic --noinput
|
| 46 |
+
|
| 47 |
+
# RUN python manege.py shell < create_superuser.py
|
| 48 |
+
|
| 49 |
+
# EXPOSE 7860
|
| 50 |
+
|
| 51 |
+
# # Comando de inicio (usar gunicorn en vez de runserver en producción)
|
| 52 |
+
# CMD ["gunicorn", "cata_system.wsgi:tecnicas", "--bind", "0.0.0.0:7860"]
|