File size: 1,015 Bytes
da11987
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
# Run this on the Ubuntu 24.04 VM to prepare for deployment

set -e

echo "=== Installing Docker ==="
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER

echo "=== Installing Docker Compose ==="
sudo apt-get update
sudo apt-get install -y docker-compose-plugin

echo "=== Installing Apache ==="
sudo apt-get install -y apache2
sudo a2enmod proxy proxy_http proxy_wstunnel rewrite headers

echo "=== Creating application directory ==="
sudo mkdir -p /opt/splicing-model
sudo chown $USER:$USER /opt/splicing-model

echo "=== Creating Docker volume for database ==="
docker volume create splicing-db

echo "=== Setup complete ==="
echo "Next steps:"
echo "1. Copy docker-compose.prod.yml to /opt/splicing-model/"
echo "2. Create .env.production file with secrets"
echo "3. Configure Apache site: sudo cp apache-site.conf /etc/apache2/sites-available/splicing.conf"
echo "4. Enable site: sudo a2ensite splicing && sudo systemctl reload apache2"
echo "5. Add GitHub Secrets for deployment"