From d1999061ad1d3b1826af313707b5f70c8997c195 Mon Sep 17 00:00:00 2001 From: juan-server Date: Tue, 11 Aug 2026 23:14:01 -0500 Subject: [PATCH] Primer commit limpio para Gitea --- backend/Dockerfile | 10 ++++++++++ backend/app.py | 32 ++++++++++++++++++++++++++++++++ backend/requirements.txt | 1 + db/pendientes.db | Bin 0 -> 12288 bytes docker-compose.yml | 12 ++++++++++++ frontend/index.html | 13 +++++++++++++ frontend/script.js | 1 + frontend/style.css | 1 + 8 files changed, 70 insertions(+) create mode 100644 backend/Dockerfile create mode 100644 backend/app.py create mode 100644 backend/requirements.txt create mode 100644 db/pendientes.db create mode 100644 docker-compose.yml create mode 100644 frontend/index.html create mode 100644 frontend/script.js create mode 100644 frontend/style.css diff --git a/backend/Dockerfile b/backend/Dockerfile new file mode 100644 index 0000000..54bf568 --- /dev/null +++ b/backend/Dockerfile @@ -0,0 +1,10 @@ +FROM python:3.11-slim + +WORKDIR /app + +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . + +CMD ["python", "app.py"] diff --git a/backend/app.py b/backend/app.py new file mode 100644 index 0000000..67c2f88 --- /dev/null +++ b/backend/app.py @@ -0,0 +1,32 @@ +import os +import sqlite3 +from flask import Flask, send_from_directory + +app = Flask(__name__) +DB_PATH = os.environ.get('DB_PATH', '/app/db/pendientes.db') + + +def init_db(): + os.makedirs(os.path.dirname(DB_PATH), exist_ok=True) + conn = sqlite3.connect(DB_PATH) + conn.execute(''' + CREATE TABLE IF NOT EXISTS pendientes ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + descripcion TEXT NOT NULL, + fecha TEXT NOT NULL, + estado TEXT NOT NULL, + urgencia TEXT NOT NULL + ) + ''') + conn.commit() + conn.close() + + +@app.route('/') +def index(): + return send_from_directory('/app/frontend', 'index.html') + + +if __name__ == '__main__': + init_db() + app.run(host='0.0.0.0', port=5000) diff --git a/backend/requirements.txt b/backend/requirements.txt new file mode 100644 index 0000000..047e950 --- /dev/null +++ b/backend/requirements.txt @@ -0,0 +1 @@ +Flask==3.0.0 diff --git a/db/pendientes.db b/db/pendientes.db new file mode 100644 index 0000000000000000000000000000000000000000..39093e73b4bf6a27ca5982ce6e5495cee6ab6321 GIT binary patch literal 12288 zcmeI#%}T>S5C`zxRP^M>t=H+TrNN75p-~nIrfH2^Fei!0Ru|f&P0|O@ckr!z7N5b1 zSc2c-lVq0Jh5h9;_jiG<4b6*knbdS4&V-a=L?nceoE^?>H1)x@;CEC16;hnP ze;jj{bMh%pNBlrQ00Izz00bZa0SG_<0uX=z1pZxM>Kt~5LmAh})528i1&_Xum0530 zp0>-*b)-D4NPAa-qE>G|PnO2zorBj)dDQLoPAI0jr_3}#dND;@@9JChrDa7LhVv!sLe@L ztDEwfZ)scIgJw48p&tPO2tWV=5P$##AOHafKmY;|fWRILVE*6ZpNp$O00Izz00bZa Q0SG_<0uX=z1bzg*0E6RV6951J literal 0 HcmV?d00001 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..d3166fe --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +version: '3.8' + +services: + app: + build: ./backend + ports: + - "5000:5000" + volumes: + - ./db:/app/db + - ./frontend:/app/frontend + environment: + - DB_PATH=/app/db/pendientes.db diff --git a/frontend/index.html b/frontend/index.html new file mode 100644 index 0000000..3e414ed --- /dev/null +++ b/frontend/index.html @@ -0,0 +1,13 @@ + + + + + + Calendario y Pendientes + + + +

Calendario y Pendientes

+ + + diff --git a/frontend/script.js b/frontend/script.js new file mode 100644 index 0000000..1234046 --- /dev/null +++ b/frontend/script.js @@ -0,0 +1 @@ +// Lógica del calendario y pendientes diff --git a/frontend/style.css b/frontend/style.css new file mode 100644 index 0000000..7a2a2ee --- /dev/null +++ b/frontend/style.css @@ -0,0 +1 @@ +/* Estilos del calendario y pendientes */