Update environment variables, enhance .gitignore, add basic installation script, and update README

This commit is contained in:
2025-08-04 19:11:29 +02:00
parent ceb7538967
commit 15a144fcb3
4 changed files with 84 additions and 20 deletions

8
.env
View File

@@ -1,8 +1,8 @@
# ===== Enviroment Stage ======
NODE_ENV=production
# ====== Database Configuration ======
POSTGRES_PASSWORD=
PGADMIN_DEFAULT_PASSWORD=
POSTGRES_PASSWORD="8*6&Ti3TJxN^"
PGADMIN_DEFAULT_PASSWORD="8*6&Ti3TJxN^"
DB_NAME="phoenix"
DB_HOST="phoenixDB"
DB_PORT=5432
@@ -19,14 +19,12 @@ SECURITY_EMAIL_SENDER="'No Reply PHX <no-reply@phx-erp.de>'"
# ====== Phoenix Super Admin Configuration ======
SUPER_ADMIN_USER_PASSWORD=123
# ====== Redis Configuration ======
REDIS_PASSWORD=
REDIS_PASSWORD="8*6&Ti3TJxN^"
# ===== Metris Configuration ======
# Loki API URL -> The IP 5.75.153.161 is the Grafana Server where it has a firewall rule to allow the connection. Please, if you change here, need to be change in NGINX too.
LOKI_URL=http://grafana.phx-erp.de:3100/loki/api/v1/push
LOKI_RETRIES=5
LOKI_BATCH_SIZE=500
# ===== HTTPS-PORTAL Configuration ======
HTTPS_PORTAL_DOMAINS=
# ====== PHX-SYSTEM Configuration ======
PHOENIX_SYSTEM_REPLICAS=1
PHX_HOST_NAME=

25
.gitignore vendored
View File

@@ -1,15 +1,10 @@
# Backup files
*.bak
*.backup
*.sql
*.dump
backup/
backups/
*.tar.gz
*.zip
*.7z
*_backup
*_backup_*
backup_*
*.old
database
assets
fail2ban
https_portal
logs
nginx
redis
pgadmin/data
database_bkp
volumes

1
README.md Normal file
View File

@@ -0,0 +1 @@
Before run base instalations run chmod +x basic_instalations.sh

70
basic-instalations.sh Normal file
View File

@@ -0,0 +1,70 @@
#!/bin/bash
set -e
echo "🛠️ Detecting OS..."
OS=$(uname -s)
install_docker_linux() {
echo "🔧 Installing Docker on Linux..."
# Remove old versions
sudo apt-get remove -y docker docker-engine docker.io containerd runc || true
# Install dependencies
sudo apt-get update
sudo apt-get install -y \
ca-certificates \
curl \
gnupg \
lsb-release
# Add Docker's official GPG key
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release && echo "$ID")/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
# Add Docker's repo
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/$(. /etc/os-release && echo "$ID") \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# Install Docker and Compose
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# Enable and start Docker
sudo systemctl enable docker
sudo systemctl start docker
# Add user to docker group
sudo usermod -aG docker "$USER"
echo "✅ Docker installed. Please log out and log back in for docker group to take effect."
}
install_docker_windows_message() {
echo "🪟 Detected Windows system."
echo "👉 Please install Docker Desktop from: https://www.docker.com/products/docker-desktop/"
echo "It includes Docker Engine + Compose and integrates with WSL2."
echo ""
echo "Make sure to:"
echo " - Enable WSL2 backend during install"
echo " - Share your drives if needed (for volume mounting)"
}
case "$OS" in
Linux)
install_docker_linux
;;
Darwin)
echo "🍏 macOS detected. Please use Docker Desktop: https://www.docker.com/products/docker-desktop"
;;
MINGW*|CYGWIN*|MSYS*|Windows_NT)
install_docker_windows_message
;;
*)
echo "❌ Unsupported OS: $OS"
exit 1
;;
esac