Initial commit: Clean Mold Cost Calculator application

- Flask-based mold cost calculation application
- PostgreSQL database with SQLAlchemy ORM
- Docker/Podman containerization
- Comprehensive documentation in docs/
- Clean, organized codebase without obsolete files
- Production-ready deployment configuration
- Enhanced pytest configuration with coverage reporting
- Master/Development branch structure
This commit is contained in:
Gan, Jimmy
2025-06-24 02:30:09 +08:00
commit 6c0d5a4e63
108 changed files with 15911 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
#!/bin/bash
# This script is for the development environment deployment.
# It's called by the post-receive hook.
set -e
# Navigate to the app directory
cd /home/jimmyg/mold_cost_online_tool || exit
# Environment
export COMPOSE_PROJECT_NAME=mold_cost_development
COMPOSE_FILE="podman-compose.development.yml"
LOG_FILE="/home/jimmyg/mold_cost_online_tool/logs/deploy.log"
echo "---" >> "$LOG_FILE"
echo "[$(date)] Starting DEVELOPMENT deployment..." >> "$LOG_FILE"
# The post-receive hook already ensures the code is updated.
# Build the new image
echo "Building new container image..." >> "$LOG_FILE"
podman-compose -f "$COMPOSE_FILE" build --no-cache >> "$LOG_FILE" 2>&1
# Restart the services
echo "Restarting services..." >> "$LOG_FILE"
podman-compose -f "$COMPOSE_FILE" down >> "$LOG_FILE" 2>&1
podman-compose -f "$COMPOSE_FILE" up -d >> "$LOG_FILE" 2>&1
echo "[$(date)] DEVELOPMENT deployment finished." >> "$LOG_FILE"