Initial commit - Mold Cost Calculator Application (Security Fixed)

This commit is contained in:
Gan, Jimmy
2025-06-24 10:28:55 +08:00
commit 9b84cee5be
108 changed files with 15886 additions and 0 deletions
Executable
+29
View File
@@ -0,0 +1,29 @@
#!/bin/bash
# This script is for the production 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_production
COMPOSE_FILE="podman-compose.yml"
LOG_FILE="/home/jimmyg/mold_cost_online_tool/logs/deploy.log"
echo "---" >> "$LOG_FILE"
echo "[$(date)] Starting PRODUCTION 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)] PRODUCTION deployment finished." >> "$LOG_FILE"