onedrive update
This commit is contained in:
@@ -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"]
|
||||
@@ -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)"
|
||||
```
|
||||
|
||||
16
onedrive/engine/docker-compose.yml
Normal file
16
onedrive/engine/docker-compose.yml
Normal 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
|
||||
@@ -1 +0,0 @@
|
||||
python3 main.py
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user