fabriquedoc/run_docker_compose.sh
2025-01-12 16:36:52 -05:00

27 lines
No EOL
631 B
Bash

#!/bin/bash
# Bash script (for Linux/macOS)
# Check if docker-compose is installed
if ! command -v docker-compose &> /dev/null
then
echo "docker-compose could not be found. Please install it and try again."
exit 1
fi
# Check if .env file exists
if [ ! -f .env ]; then
echo ".env file not found. Please create it and try again."
exit 1
fi
# Load environment variables from .env file
set -a
source .env
set +a
# Set a custom project name (which will be used for the network name)
PROJECT_NAME="fabriquedoc"
# Run docker-compose with the custom project name
docker-compose --project-name $PROJECT_NAME up --build