Pyboxs commited on
Commit
cafecb9
·
verified ·
1 Parent(s): 03b23d1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -8
Dockerfile CHANGED
@@ -1,8 +1,24 @@
1
- FROM python:3.11-slim
2
- WORKDIR $HOME/app
3
- COPY requirements.txt $HOME/app
4
- RUN mkdir /.cache && chmod 777 /.cache
5
- RUN pip install -r requirements.txt
6
- COPY . $HOME/app
7
- EXPOSE 23333
8
- CMD ["python", "-m", "apis.chat_api"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Usa una imagen base de nginx
2
+ FROM nginx:latest
3
+
4
+ # Instala wget para descargar Swagger UI
5
+ RUN apt-get update && apt-get install -y wget
6
+
7
+ # Descarga la última versión de Swagger UI
8
+ RUN wget https://github.com/swagger-api/swagger-ui/archive/refs/heads/main.zip -O swagger-ui.zip \
9
+ && apt-get install -y unzip \
10
+ && unzip swagger-ui.zip \
11
+ && mv swagger-ui-main /usr/share/nginx/html/swagger-ui \
12
+ && rm swagger-ui.zip
13
+
14
+ # Copia tu archivo de configuración de Swagger a la carpeta de Swagger UI
15
+ COPY swagger.yaml /usr/share/nginx/html/swagger-ui/swagger.yaml
16
+
17
+ # Copia un archivo de configuración de Nginx para servir Swagger UI
18
+ COPY nginx.conf /etc/nginx/conf.d/default.conf
19
+
20
+ # Exponer el puerto 80 para el tráfico HTTP
21
+ EXPOSE 80
22
+
23
+ # Inicia Nginx
24
+ CMD ["nginx", "-g", "daemon off;"]