Commit Graph

18 Commits

Author SHA1 Message Date
Ollama
2688406020 fix: escape special characters in passwords for sed
Base64 passwords can contain /, +, = which break sed with |
delimiter. Also escape & and \ characters for safety.
2026-05-18 15:09:59 +02:00
Ollama
3366a38591 fix: address remaining CodeRabbit issues
- Add SQL injection validation for DB_NAME, DB_USER, DB_HOST
- Honor OSPOS_DIR during extraction (was hardcoded to /var/www)
- Fix SSL_EMAIL alone enabling Let's Encrypt (use APACHE_SERVER_NAME as domain)
- Quote OSPOS_DIR variables to prevent word splitting
2026-05-18 15:09:58 +02:00
Ollama
32d65da4f4 fix: address CodeRabbit review comments
- Remove duplicate php-gd package
- Disable directory listing (Options -Indexes)
- Propagate MYSQL_ROOT_PASS to all mysql commands
- Fix allowedHostnames sed pattern to match .env.example format
2026-05-18 15:09:58 +02:00
Ollama
88dba77226 chore: remove debug output after fix verification 2026-05-18 15:09:58 +02:00
Ollama
dee9661210 fix: use | delimiter in sed to handle special characters in passwords
The / delimiter was breaking when passwords contain special chars like !
2026-05-18 15:09:58 +02:00
Ollama
cc69015771 fix: copy hidden files from extraction directory
Hidden files like .env were not being copied because shell glob *
doesn't match hidden files. Use 'ospos-temp/.' to copy all files.
2026-05-18 15:09:58 +02:00
Ollama
3281438d4c fix: add debug output to trace .env configuration 2026-05-18 15:09:58 +02:00
Ollama
5aed26b66e fix: add verification output for .env configuration 2026-05-18 15:09:58 +02:00
Ollama
4e48209ed8 fix: generate encryption key for OSPOS
The release .env has an empty encryption key which causes
HTTP 500 on startup. Generate a random key if the value is empty.
2026-05-18 15:09:58 +02:00
Ollama
9d035a73ac fix: match quoted values in .env file for sed substitutions
The .env file from release uses quoted values like 'localhost'
but sed patterns were looking for unquoted values, causing
database credentials to not be updated.
2026-05-18 15:09:58 +02:00
Ollama
8dba7816ea fix: configure .env even when .env.example doesn't exist
Release zip contains .env directly, not .env.example. The sed commands
to update database credentials were being skipped because the file check
looked for .env.example first, which doesn't exist in published releases.
2026-05-18 15:09:58 +02:00
Ollama
a9ebf8562c fix: extract release zip directly to OSPOS directory
The release zip files extract at root level without a subdirectory
2026-05-18 15:09:58 +02:00
Ollama
1901043065 fix: use correct release asset URL from GitHub API
Releases use opensourcepos.VERSION.HASH.zip naming format, not
opensourcepos-VERSION.zip. This fix fetches the actual asset URL
from the GitHub API and extracts the correct directory name.
2026-05-18 15:09:58 +02:00
Ollama
2b90929ed4 fix: add ondrej/php PPA when PHP version not in default repos
The install script was failing on Ubuntu 22.04 because PHP 8.2 is not
available in default repositories. This fix checks if the requested
PHP version is available, and if not, adds the ondrej/php PPA which
provides all supported PHP versions.
2026-05-18 15:09:58 +02:00
Ollama
c87b51a698 Add interactive SSL configuration prompt
- Prompts user for SSL preferences during installation
- Asks for domain name and email interactively
- Falls back to environment variables for non-interactive mode
- Shows SSL status in final output (Let's Encrypt / self-signed / none)
- Updates INSTALL.md with interactive/non-interactive examples

Interactive mode (recommended):
  curl -sSL https://opensourcepos.org/install | sudo bash
  # Prompts for SSL, domain, and email

Non-interactive mode:
  curl -sSL https://opensourcepos.org/install | \
    APACHE_SERVER_NAME=pos.example.com \
    SSL_EMAIL=admin@example.com \
    sudo -E bash
2026-05-18 15:09:58 +02:00
Ollama
f3c0c2ea8f Add automatic SSL/TLS certificate setup
- Adds Let's Encrypt support for production (with auto-renewal via certbot.timer)
- Falls back to self-signed certificate for development/testing
- New SSL_EMAIL environment variable enables production SSL
- HTTPS redirect automatically configured for all sites
- Updates INSTALL.md with SSL documentation and examples

Production usage:
  SSL_EMAIL=admin@example.com APACHE_SERVER_NAME=pos.example.com

Development usage (self-signed cert):
  APACHE_SERVER_NAME=localhost (default)
2026-05-18 15:09:58 +02:00
Ollama
59feca7ece Download latest stable release instead of master branch
- Fetches latest release version from GitHub API
- Downloads pre-built release zip instead of cloning repo
- Renamed OSPOS_BRANCH to OSPOS_VERSION for clarity
- Supports installing specific version via OSPOS_VERSION
- Removed need for composer install (release is pre-built)
- More stable for production deployments
2026-05-18 15:09:58 +02:00
jekkos
1a112a1fd1 Add one-line Ubuntu installation script
- Creates scripts/install-ubuntu.sh for automated fresh Ubuntu server setup
- Installs Apache, MariaDB, PHP 8.2 with required extensions
- Downloads and configures OSPOS from GitHub
- Sets up Apache virtual host with proper permissions
- Generates secure random database password
- Supports environment variables for customization
- Updates INSTALL.md with curl pipe to bash instructions

This provides an alternative to cloud-specific instructions and
allows users to quickly set up OSPOS on any fresh Ubuntu server.
2026-05-18 15:09:58 +02:00