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:
Executable
+29
@@ -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"
|
||||
Reference in New Issue
Block a user