From 69714190a3cf52a799b6c9cb0f63030dc449e3b1 Mon Sep 17 00:00:00 2001 From: 41abku1mst <41abku1mst@hft-stuttgart.de> Date: Wed, 27 Aug 2025 12:22:59 +0200 Subject: [PATCH] env file change --- Dockerfile | 6 ++++++ docker-compose.yml | 6 ++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3d9a003..056f7b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,8 @@ FROM debian:bookworm +# Set the DEBIAN_FRONTEND variable to prevent interactive prompts during package installation. +ARG DEBIAN_FRONTEND=noninteractive + # Install Apache, PHP, and other required extensions # ADDED: sudo and mariadb-client for the entrypoint script RUN apt-get update && apt-get install -y \ @@ -25,6 +28,9 @@ RUN apt-get update && apt-get install -y \ COPY moodle.ini /etc/php/8.2/apache2/conf.d/99-moodle.ini COPY moodle.ini /etc/php/8.2/cli/conf.d/99-moodle.ini +# Set a global ServerName for Apache to suppress the FQDN warning. +RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf + # Download and unpack Moodle ARG MOODLE_VERSION=403 RUN rm -rf /var/www/html diff --git a/docker-compose.yml b/docker-compose.yml index 8c03114..8d60c20 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,10 +29,8 @@ services: depends_on: - db restart: unless-stopped - environment: - - MOODLE_WWWROOT= "http://docker:8080" - - MOODLE_ADMIN_USER=user - - MOODLE_ADMIN_PASS=QAYwsx@12345 + env_file: + - .env backend: container_name: backend -- GitLab