fix: replace mysql-server with mariadb-server for Debian 12/13 compatibility

- Use mariadb-server instead of mysql-server (works on both Ubuntu and Debian)
- Update mysql_service to mariadb for proper service management
- Update docker/Dockerfile and start-services.sh for MariaDB
This commit is contained in:
Sebastian Palencsar
2026-05-06 12:59:15 +02:00
parent 605b4e8c7b
commit 1fa863f107
3 changed files with 7 additions and 7 deletions

View File

@@ -50,8 +50,8 @@ RUN apt-get update && apt-get install -y \
# Web server
nginx \
# Database
mysql-server \
mysql-client \
mariadb-server \
mariadb-client \
# PHP and extensions
php8.4 \
php8.4-fpm \
@@ -84,7 +84,7 @@ RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/
# Configure systemd
RUN systemctl enable ssh \
&& systemctl enable nginx \
&& systemctl enable mysql \
&& systemctl enable mysql mariadb \
&& systemctl enable php8.4-fpm
# Create web directory structure

View File

@@ -1,8 +1,8 @@
#!/bin/bash
# Services für LEMP-Stack starten
# MySQL starten
service mysql start
# MySQL/MariaDB starten
service mysql start || service mariadb start
# PHP-FPM starten
service php8.4-fpm start

View File

@@ -3,7 +3,7 @@
# Package names for Ubuntu/Debian systems
packages:
- nginx
- mysql-server
- mariadb-server
- php8.4-fpm
- php8.4-mysql
- php8.4-curl
@@ -19,7 +19,7 @@ packages:
- fail2ban
# Service names
mysql_service: mysql
mysql_service: mariadb
nginx_service: nginx
php_fpm_service: php8.4-fpm