Browse Source

limesurvey: put uploads in CHATONS_ROOT_DIR

Guilhem Saurel 6 years ago
parent
commit
fc7741c5d6
2 changed files with 8 additions and 5 deletions
  1. 3 2
      limesurvey/Dockerfile.fpm
  2. 5 3
      limesurvey/docker-compose.yml

+ 3 - 2
limesurvey/Dockerfile.fpm

@@ -12,10 +12,11 @@ RUN wget -q $URL -O $FILE \
  && tar xf $FILE --strip-components=1 \
  && rm $FILE
 
-RUN chown -R www-data tmp upload application/config
+RUN chown -R www-data tmp application/config
 ADD config.php application/config/
 
-VOLUME /var/www/html
+VOLUME /var/www/html /var/www/html/upload
 
 CMD sed -i "s|POSTGRES_PASSWORD|$POSTGRES_PASSWORD|" application/config/config.php \
+ && chown -R www-data upload \
  && php-fpm

+ 5 - 3
limesurvey/docker-compose.yml

@@ -5,7 +5,7 @@ networks:
     external: true
 
 volumes:
-  vol:
+  data:
 
 services:
   postgres:
@@ -24,7 +24,8 @@ services:
     env_file:
       - .env
     volumes:
-      - vol:/var/www/html
+      - data:/var/www/html
+      - ${CHATONS_ROOT_DIR:-/srv/chatons}/limesurvey/upload:/var/www/html/upload
 
   web:
     build:
@@ -39,4 +40,5 @@ services:
       - web
       - default
     volumes:
-      - vol:/var/www/html:ro
+      - data:/var/www/html:ro
+      - ${CHATONS_ROOT_DIR:-/srv/chatons}/limesurvey/upload:/var/www/html/upload:ro