feat: Release version 1.3.5 with coderk Docker image preparation

- Updated README.md version references from 1.8 to 1.3.5
- Changed Docker image from marcogll/ap_pos:latest to coderk/ap_pos:1.3.5
- Prepared Docker configuration for coderk deployment

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Marco Gallegos
2025-09-02 14:30:10 -06:00
parent 1e92398891
commit 541d2f8883
7 changed files with 1431 additions and 181 deletions

View File

@@ -21,14 +21,16 @@ app.use(session({
secret: SESSION_SECRET,
resave: false,
saveUninitialized: false,
cookie: { secure: IN_PROD, httpOnly: true, maxAge: 24 * 60 * 60 * 1000 } // `secure: true` en producción con HTTPS
cookie: { secure: false, httpOnly: true, maxAge: 24 * 60 * 60 * 1000 } // secure: false para VPS sin HTTPS
}));
// --- DATABASE INITIALIZATION ---
// Usar un path que funcione tanto en desarrollo como en Docker
const dbPath = process.env.NODE_ENV === 'production'
? path.join(__dirname, 'data', 'ap-pos.db')
: path.join(__dirname, 'ap-pos.db');
const dbPath = process.env.DB_PATH || (
process.env.NODE_ENV === 'production'
? path.join(__dirname, 'data', 'ap-pos.db')
: path.join(__dirname, 'ap-pos.db')
);
console.log(`Connecting to database at: ${dbPath}`);
const db = new sqlite3.Database(dbPath, (err) => {
@@ -485,8 +487,8 @@ function startServer() {
}
});
// --- Dashboard Route (Admin Only) ---
apiRouter.get('/dashboard', isAdmin, (req, res) => {
// --- Dashboard Route (Authenticated Users) ---
apiRouter.get('/dashboard', isAuthenticated, (req, res) => {
const queries = {
totalIncome: "SELECT SUM(monto) as total FROM movements",
totalMovements: "SELECT COUNT(*) as total FROM movements",