sk1/aws-deploy.sh
2026-05-19 22:47:34 +00:00

50 lines
992 B
Bash

#!/bin/bash
echo "========================================"
echo "Cloud Notes Platform AWS Deployment"
echo "========================================"
echo ""
echo "Updating Ubuntu packages..."
sudo apt update -y
echo ""
echo "Installing Docker..."
sudo apt install docker.io docker-compose-v2 git nginx certbot python3-certbot-nginx -y
echo ""
echo "Starting Docker service..."
sudo systemctl enable docker
sudo systemctl start docker
echo ""
echo "Adding ubuntu user to Docker group..."
sudo usermod -aG docker ubuntu
echo ""
echo "Creating environment configuration..."
cat <<EOF > .env
POSTGRES_PASSWORD=StrongPassword123
EOF
echo ""
echo "Building and starting containers..."
docker compose up -d --build
echo ""
echo "Waiting for services..."
sleep 10
echo ""
echo "Currently running containers:"
docker ps
echo ""
echo "Deployment completed successfully."
echo ""
echo "Application URL:"
echo "https://notecloud.duckdns.org"
echo "========================================"