#!/bin/zsh # Load parameters ACTION=$1 ENV_FILE=".env" # Check if .env file exists if [[ ! -f $ENV_FILE ]]; then echo "Error: $ENV_FILE file not found!" echo "Please create $ENV_FILE file with the following variables:" echo "DEV_URL=your.domain.com" echo "EXTERNAL_NETWORK=your_network_name" exit 1 fi # Load environment variables source $ENV_FILE case "$ACTION" in "up") docker network create $EXTERNAL_NETWORK > /dev/null 2>&1 || true docker compose up -d ;; "restart") docker compose restart ;; "down") docker compose down ;; *) echo "Usage: $0 [up|restart|down]" exit 1 ;; esac