Metainformationen zur Seite
  •  

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Nächste Überarbeitung
Vorhergehende Überarbeitung
digitales:software:docker:lemp-webtrees [24.10.2023] – angelegt csdigitales:software:docker:lemp-webtrees [11.11.2024] (aktuell) – Externe Bearbeitung 127.0.0.1
Zeile 4: Zeile 4:
  
   * [[https://linuxiac.com/how-to-set-up-lemp-stack-with-docker-compose/]]   * [[https://linuxiac.com/how-to-set-up-lemp-stack-with-docker-compose/]]
 +
 +==== docker-compose.yaml ====
  
 <code yaml docker-compose.yaml> <code yaml docker-compose.yaml>
Zeile 17: Zeile 19:
         volumes:         volumes:
             - './php-files:/var/www/html'             - './php-files:/var/www/html'
 +            - './php.ini:/usr/local/etc/php/php.ini'
 +
         depends_on:         depends_on:
             - mariadb             - mariadb
Zeile 48: Zeile 52:
         environment:         environment:
             PMA_HOST: mariadb             PMA_HOST: mariadb
 +            UPLOAD_LIMIT: 100M
         depends_on:         depends_on:
             - mariadb             - mariadb
Zeile 57: Zeile 62:
  
 </code> </code>
 +
 +
 +==== php-dockerfile ====
 +
 +<code - php-dockerfile>
 +FROM php:8.1-fpm
 +
 +# Installing dependencies for the PHP modules
 +RUN apt-get update && \
 +    apt-get install -y zip libzip-dev libpng-dev php-curl php-mbstring
 +
 +# Installing additional PHP modules
 +RUN docker-php-ext-install mysqli pdo pdo_mysql gd zip mbstring curl exif intl
 +
 +
 +</code>
 +
 +
 +==== php-files/index.php ====
 +
 +<code ->
 +<?php phpinfo(); ?>
 +</code>
 +
 +==== nginx-conf/nginx.conf ====
 +
 +<code - nginx.conf>
 +server {
 +    listen 80 default_server;
 +    listen [::]:80 default_server;
 +    
 +    server_name localhost;
 +    client_max_body_size 30m;
 +
 +    root /var/www/html;
 +    index index.php index.html;
 +
 +    location / {
 +        try_files $uri $uri/ /index.php?$args;
 +    }
 +
 +    location ~* \.php$ {
 +        fastcgi_pass php:9000;
 +        include fastcgi_params;
 +        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
 +        fastcgi_param SCRIPT_NAME $fastcgi_script_name;
 +    }
 +}
 +
 +</code>
 +
 +
 +===== How to Create Nginx Virtual Host (Server Block) =====
 +
 +  * [[https://linuxiac.com/nginx-virtual-host/]]