2024-12-31 22:00:07 +00:00
|
|
|
#!/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
|
|
|
|
|
2025-01-12 21:36:52 +00:00
|
|
|
# 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
|