onedrive update

This commit is contained in:
kadma
2025-03-16 16:10:08 -05:00
committed by GitHub
parent 730ae6124a
commit 867fdd776c
13 changed files with 98 additions and 91 deletions

View File

@@ -1,25 +1,26 @@
FROM ubuntu
# Usar una imagen base más ligera y específica
FROM python:3.9-slim
# Establecer el directorio de trabajo
WORKDIR /app
RUN apt update && apt upgrade -y && apt autoremove -y && apt install python3 python3-pip -y && apt install git nano wget -y
# Instalar dependencias del sistema y limpiar caché en un solo RUN
RUN apt-get update && \
apt-get install -y --no-install-recommends git wget && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Clonar el repositorio
RUN git clone https://github.com/TheCaduceus/Microsoft-E5-Auto-Renewal /app
RUN pip install -r requirements.txt
# Instalar dependencias de Python
RUN pip install --no-cache-dir -r requirements.txt
# Copiar el resto de los archivos
COPY . .
ENV E5_CLIENT_ID="id"
ENV E5_CLIENT_SECRET="secret"
ENV E5_REFRESH_TOKEN="token"
ENV WEB_APP_PASSWORD="pass"
# Exponer el puerto
EXPOSE 8080
RUN chmod +x run.sh
ENTRYPOINT ./run.sh
# Establecer el comando de entrada
CMD ["python", "main.py"]

View File

@@ -1,6 +1,2 @@
## sin actualizar
#### manual
```sh
apt update && apt install wget -y && bash -c "$(wget -qLO - https://raw.githubusercontent.com/kadma/pruebasdocker/main/onedrive/engine/script.sh)"
```

View File

@@ -0,0 +1,16 @@
---
services:
odengin:
build: .
container_name: odengin
environment:
- E5_CLIENT_ID=id
- E5_CLIENT_SECRET=secret
- E5_REFRESH_TOKEN=tokenit
- WEB_APP_PASSWORD=123
- E5_WEB_APP_PASSWORD=123
ports:
- 8089:8080
restart: unless-stopped
hostname: odengin
network_mode: bridge

View File

@@ -1 +0,0 @@
python3 main.py

View File

@@ -1,4 +0,0 @@
apt update && apt upgrade -y && apt autoremove -y && apt install python3 python3-pip -y && apt install git nano curl -y
git clone https://github.com/TheCaduceus/Microsoft-E5-Auto-Renewal /app
pip3 install -r /app/requirements.txt
python3 /app/main.py