chartManD commited on
Commit
d2887c6
·
1 Parent(s): d1ba971

Config Dockerfile cambio de imagen a debian 12

Browse files
Files changed (1) hide show
  1. Dockerfile +38 -14
Dockerfile CHANGED
@@ -1,28 +1,52 @@
1
- FROM python:3.11-slim
 
 
 
 
2
 
3
  WORKDIR /app
4
 
5
- RUN ls
 
6
 
7
- COPY requirements.txt .
 
8
 
9
- RUN pip install -r --upgrade pip
 
10
 
11
- RUN ls
 
12
 
13
- RUN pip install -r requirements.txt
 
 
14
 
15
- COPY . .
16
 
17
- RUN python manege.py migrate
18
 
19
- RUN python manage.py tailwind build
20
 
21
- RUN python manage.py collectstatic --noinput
22
 
23
- RUN python manege.py shell < create_superuser.py
24
 
25
- EXPOSE 7860
26
 
27
- # Comando de inicio (usar gunicorn en vez de runserver en producción)
28
- CMD ["gunicorn", "cata_system.wsgi:tecnicas", "--bind", "0.0.0.0:7860"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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"]