Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ export REACT_APP_PROJECT_DIR="$PROJECT_DIR"
export REACT_APP_ENV="PROD"
export REACT_APP_SERVER_URL="https://$DOMAIN"

# Create .env file for Docker Compose
cat > .env << EOF
REACT_APP_DOMAIN=$DOMAIN
REACT_APP_EMAIL=$EMAIL
REACT_APP_TRAEFIK_PASSWORD_HASH=$TRAEFIK_PASSWORD_HASH
REACT_APP_PROJECT_DIR=$PROJECT_DIR
REACT_APP_ENV=PROD
REACT_APP_SERVER_URL=https://$DOMAIN
EOF

# Debug: Show environment variables (without sensitive data)
echo "🔍 Debug: Environment variables set:"
echo " DOMAIN: $DOMAIN"
Expand All @@ -47,6 +57,8 @@ echo " REACT_APP_EMAIL: $REACT_APP_EMAIL"
echo " REACT_APP_ENV: $REACT_APP_ENV"
echo " REACT_APP_SERVER_URL: $REACT_APP_SERVER_URL"

echo "🔍 Debug: .env file created for Docker Compose"

# Navigate to project directory
cd "$PROJECT_DIR"

Expand Down Expand Up @@ -105,7 +117,7 @@ sudo docker compose down

# Build and start new containers
echo "🔨 Building and starting containers..."
sudo -E docker compose up -d --build
sudo docker compose up -d --build

# Wait for containers to be healthy
echo "⏳ Waiting for containers to be ready..."
Expand Down