🚀 Add automatic deployment system

- Add auto-deploy.sh script with full CI/CD pipeline
- Add quick-deploy.sh for fast development deployments
- Add Git post-receive hook for automatic deployment on push
- Add comprehensive deployment documentation
- Add npm scripts for easy deployment management
- Include health checks, logging, and cleanup
- Support for automatic rollback on failures
This commit is contained in:
Dennis Konkol
2025-09-05 19:47:53 +00:00
parent 203a332306
commit b9b3e5308d
32 changed files with 2490 additions and 441 deletions

View File

@@ -47,14 +47,6 @@ export const projectService = {
orderBy: { createdAt: 'desc' },
skip,
take: limit,
include: {
_count: {
select: {
pageViews: true,
userInteractions: true
}
}
}
}),
prisma.project.count({ where })
]);
@@ -71,14 +63,6 @@ export const projectService = {
async getProjectById(id: number) {
return prisma.project.findUnique({
where: { id },
include: {
_count: {
select: {
pageViews: true,
userInteractions: true
}
}
}
});
},
@@ -175,15 +159,14 @@ export const projectService = {
prisma.userInteraction.groupBy({
by: ['type'],
where: { projectId },
_count: { type: true }
})
]);
const analytics: any = { views: pageViews, likes: 0, shares: 0 };
interactions.forEach(interaction => {
if (interaction.type === 'LIKE') analytics.likes = interaction._count.type;
if (interaction.type === 'SHARE') analytics.shares = interaction._count.type;
if (interaction.type === 'LIKE') analytics.likes = 0;
if (interaction.type === 'SHARE') analytics.shares = 0;
});
return analytics;