From 04783e85762767f53236726708936f7982f4f31c Mon Sep 17 00:00:00 2001 From: Albert Bertram Date: Mon, 9 Dec 2024 11:27:30 -0500 Subject: [PATCH] Dealing with permissions. --- Dockerfile | 3 ++- README.md | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e46f21f..0de0851 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,8 @@ RUN apt-get update \ && chown www-data:www-data /var/cache/apache2/mod_auth_openidc/oidc-sessions /var/cache/apache2/twig \ && docker-php-ext-install pdo_mysql \ && php -r "copy('https://getcomposer.org/download/latest-stable/composer.phar', '/usr/local/bin/composer');" \ - && chmod +x /usr/local/bin/composer + && chmod +x /usr/local/bin/composer \ + && git config --global --add safe.directory /var/www COPY auth_openidc.conf /etc/apache2/mods-enabled/auth_openidc.conf COPY composer.lock composer.json /var/www/ diff --git a/README.md b/README.md index cfe3e59..4f0fa1f 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,11 @@ docker-compose build # Start the webserver and database server docker-compose up -d +# Composer install for the development volume +docker-compose run --rm web bash -c 'cd /var/www && composer install' + # Optional: Load data docker-compose exec -T db bash -c 'mysql -u "$MARIADB_USER" -p"$MARIADB_PASSWORD" "$MARIADB_DATABASE"' < data.sql + + ```