changed db engine to mysql
All checks were successful
Deploy FluentGerman.ai / deploy (push) Successful in 50s

This commit is contained in:
2026-02-12 22:11:41 +01:00
parent ababfc7c08
commit 1406c95fea
6 changed files with 20 additions and 17 deletions

View File

@@ -23,14 +23,13 @@ apt-get update -qq
apt-get install -y -qq python3 python3-venv python3-pip > /dev/null
echo "✓ Python installed"
# 3. PostgreSQL database setup
sudo -u postgres psql -tc "SELECT 1 FROM pg_roles WHERE rolname='$DB_USER'" | grep -q 1 || \
sudo -u postgres psql -c "CREATE USER $DB_USER WITH PASSWORD 'CHANGE_ME';"
sudo -u postgres psql -tc "SELECT 1 FROM pg_database WHERE datname='$DB_NAME'" | grep -q 1 || \
sudo -u postgres psql -c "CREATE DATABASE $DB_NAME OWNER $DB_USER;"
echo "✓ PostgreSQL database ready"
# 3. MySQL database setup
echo "Setting up MySQL database..."
mysql -u root -e "CREATE DATABASE IF NOT EXISTS $DB_NAME CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
mysql -u root -e "CREATE USER IF NOT EXISTS '$DB_USER'@'localhost' IDENTIFIED BY 'CHANGE_ME';"
mysql -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost';"
mysql -u root -e "FLUSH PRIVILEGES;"
echo "✓ MySQL database ready"
# 4. Application directory
mkdir -p "$APP_DIR"
@@ -64,7 +63,7 @@ systemctl start "$APP_NAME"
echo "✓ Systemd service active"
# 8. Nginx config
cp deploy/nginx.conf /etc/nginx/sites-available/$APP_NAME
cp deploy/nginx.conf.example /etc/nginx/sites-available/$APP_NAME
ln -sf /etc/nginx/sites-available/$APP_NAME /etc/nginx/sites-enabled/
nginx -t && systemctl reload nginx
echo "✓ Nginx configured"