commit d1999061ad1d3b1826af313707b5f70c8997c195 Author: juan-server Date: Tue Aug 11 23:14:01 2026 -0500 Primer commit limpio para Gitea 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 0000000..39093e7 Binary files /dev/null and b/db/pendientes.db differ 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 */