try to fix manifest issues
Browse files- Dockerfile +1 -0
- app/main.py +11 -3
Dockerfile
CHANGED
|
@@ -11,6 +11,7 @@ COPY app/requirements.txt .
|
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
COPY app/ .
|
|
|
|
| 14 |
|
| 15 |
# Exponer el puerto que definimos en main.py
|
| 16 |
EXPOSE 8080
|
|
|
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
COPY app/ .
|
| 14 |
+
COPY assets/ ./assets/
|
| 15 |
|
| 16 |
# Exponer el puerto que definimos en main.py
|
| 17 |
EXPOSE 8080
|
app/main.py
CHANGED
|
@@ -348,8 +348,8 @@ def main(page: ft.Page):
|
|
| 348 |
mensaje_tg = (
|
| 349 |
"🛠 *NUEVA SOLICITUD DE PRÉSTAMO*\n"
|
| 350 |
f"👤 *Alumno:* {escape_md(nombre.value)}\n"
|
| 351 |
-
f"
|
| 352 |
-
f"
|
| 353 |
)
|
| 354 |
|
| 355 |
res_tg = enviar_telegram_con_botones(loan_id, mensaje_tg)
|
|
@@ -448,4 +448,12 @@ def main(page: ft.Page):
|
|
| 448 |
|
| 449 |
if __name__ == "__main__":
|
| 450 |
port = int(os.getenv("PORT", 7860))
|
| 451 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 348 |
mensaje_tg = (
|
| 349 |
"🛠 *NUEVA SOLICITUD DE PRÉSTAMO*\n"
|
| 350 |
f"👤 *Alumno:* {escape_md(nombre.value)}\n"
|
| 351 |
+
f" *Horario:* {h_ext.value} a {h_dev.value}\n"
|
| 352 |
+
f" *Herramientas:*\n{escape_md(lista_items_str)}"
|
| 353 |
)
|
| 354 |
|
| 355 |
res_tg = enviar_telegram_con_botones(loan_id, mensaje_tg)
|
|
|
|
| 448 |
|
| 449 |
if __name__ == "__main__":
|
| 450 |
port = int(os.getenv("PORT", 7860))
|
| 451 |
+
|
| 452 |
+
# Buscar la carpeta de assets (local: ../assets, docker: ./assets)
|
| 453 |
+
current_dir = os.path.dirname(os.path.abspath(__file__))
|
| 454 |
+
assets_path = os.path.join(current_dir, "assets")
|
| 455 |
+
if not os.path.exists(assets_path):
|
| 456 |
+
assets_path = os.path.join(current_dir, "../assets")
|
| 457 |
+
|
| 458 |
+
print(f"DEBUG: assets_dir set to: {assets_path}")
|
| 459 |
+
ft.app(target=main, view=ft.AppView.WEB_BROWSER, host="0.0.0.0", port=port, assets_dir=assets_path)
|