discourse/scripts/deploy-backend.sh

26 lines
584 B
Bash
Raw Normal View History

2025-03-25 03:52:30 -04:00
#!/bin/bash
# Script to deploy the VoxPop backend services
# Exit on any error
set -e
# Set variables
ENV=${1:-development}
PROJECT_ROOT=$(dirname "$(dirname "$(realpath "$0")")")
BACKEND_DIR="$PROJECT_ROOT/backend"
echo "Deploying VoxPop backend services in $ENV environment..."
# Navigate to backend directory
cd "$BACKEND_DIR"
# Build the services
echo "Building backend services..."
go build -o ./bin/api ./cmd/api
# Start services using Docker Compose
echo "Starting services with Docker Compose..."
docker-compose up -d
echo "Backend deployment completed successfully!"