Browse Source

update docker to new standard

Florian HENRY 4 years ago
parent
commit
1dc84c5715
3 changed files with 11 additions and 4 deletions
  1. 1 0
      build/docker/README.md
  2. 1 2
      build/docker/docker-compose.yml
  3. 9 2
      build/docker/docker-run.sh

+ 1 - 0
build/docker/README.md

@@ -28,3 +28,4 @@ The URL to go to PhpMyAdmin is (login/password is root/root) :
 
 Setup the database connection during the installation process, please use mariad
 b (name of the database container) as database host.
+Setup documents folder, during the installation process, to /var/documents

+ 1 - 2
build/docker/docker-compose.yml

@@ -28,8 +28,7 @@ services:
             - external-pod
 
     web:
-        build:
-            context: .
+        build: .
         environment:
             HOST_USER_ID: $HOST_USER_ID
         volumes:

+ 9 - 2
build/docker/docker-run.sh

@@ -1,11 +1,18 @@
 #!/bin/bash
 
-usermod -u "${HOST_USER_ID}" www-data
-groupmod -g "${HOST_USER_ID}" www-data
+usermod -u ${HOST_USER_ID} www-data
+groupmod -g ${HOST_USER_ID} www-data
 
 chgrp -hR www-data /var/www/html
 chmod g+rwx /var/www/html/conf
 
+if [ ! -d /var/documents ]; then
+	echo "[docker-run] => create volume directory /var/documents ..."
+  	mkdir -p /var/documents
+fi
+echo "[docker-run] => Set Permission to www-data for /var/documents"
+chown -R www-data:www-data /var/documents
+
 if [ ! -f /usr/local/etc/php/php.ini ]; then
   cat <<EOF > /usr/local/etc/php/php.ini
 date.timezone = $PHP_INI_DATE_TIMEZONE